Fix for thumbnail
-
Thank you for the plugin. I found a bug in the template/feed-json.php. If get_the_post_thumbnail uses srcset, you’ll have two image urls and the thumbnail param will be useless. I recommend using get_the_post_thumbnail instead. no regex needed.
$single["thumbnail"] = preg_replace("/^.*['\"](https?:\/\/[^'\"]*)['\"].*/i","$1",get_the_post_thumbnail($id)); // existing version $single["thumbnail"] = get_the_post_thumbnail_url($id); // suggested replacement
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fix for thumbnail’ is closed to new replies.