Default thumbnail doesn’t appear
-
Hello,
I’ve set display the thumbnails and also the default image.
The feed’s images work good but if isn’t an image in the feed the default image not shows up.Any advise to solve it?
Thank you!
The page I need help with: [log in to see the link]
-
@vegroland Please paste the entire shortcode you are using so that we can try it at our end.
Hello,
this is shortcode:
[feedzy-rss feeds=”ultimas-noticias” max=”12″ offset=”0″ feed_title=”yes” sort=”date_desc” target=”_blank” title=”140″ meta=”time, tz=source, author” multiple_meta=”source” summary=”yes” summarylength=”140″ thumb=”yes” default=”https://buscarnoticias.es/wp-content/uploads/2020/03/buscarnoticias_favicon.jpg” size=”80″ ]This is the used category’s feed list:
https://www.europapress.es/rss/rss.aspx,
http://ep00.epimg.net/rss/tags/ultimas_noticias.xml,
http://estaticos.elmundo.es/elmundo/rss/portada.xml,
https://www.lavanguardia.com/mvc/feed/rss/home,
http://api2.rtve.es/rss/temas_noticias.xml,
https://www.abc.es/rss/feeds/abc_ultima.xml,@vegroland unfortunately we don’t see any posts that have no images. Please share a screenshot.
@rozroz here is the issue: https://ibb.co/37R2mt0
This is a fast-updated news feed so if there doesn’t appear a feed item without image, please reload it in 1-2 minutes.
Sure that you will see at least one.Thank you!
Another screenshot where are more than one blank images: https://ibb.co/L5nmQ2L
@vegroland I don’t see a problem with the behavior. Next time you come across this, can you please save the page as an HTML and share it here?
Hello @rozroz ,
of course:
screenshot: https://ibb.co/xgVFwqr
Saved website: https://drive.google.com/open?id=1miMJshP2Kc1Z8SdUyn7eYFSNWzkXxu4k@vegroland this is happening because the feed contains an image as shown here but that image points to an XML. So the plugin is behaving correctly. If you want to override this behavior and instead force show the default image, you can use this
add_filter('feedzy_thumb_output', 'feedzy_thumb_output', 10, 4 ); function feedzy_thumb_output($contentThumb, $feedURL, $sizes, $item){ if ( strpos( $contentThumb, 'http://www.elmundo.es/rss/index.xml' ) !== false ) { $contentThumb = 'https://buscarnoticias.es/wp-content/uploads/2020/03/buscarnoticias_favicon.jpg'; } return $contentThumb; }@rozroz, thank you!
I have copied your code in my function.php but now the image’s url is showing in the image area.
Screenshot: https://ibb.co/0jydxck@vegroland try this:
function feedzy_thumb_output($contentThumb, $feedURL, $sizes, $item){ if ( strpos( $contentThumb, 'http://www.elmundo.es/rss/index.xml' ) !== false ) { $contentThumb = '<img src="https://buscarnoticias.es/wp-content/uploads/2020/03/buscarnoticias_favicon.jpg">'; } return $contentThumb; }I’m having the same issue. I tried this solution, but I’m not seeing results. Using the shortcode with the “default=” statement. This feed – https://rssfeeds.freep.com/freep/news generally (not today) sends many posts without images. I pulled their feed, and they’re sending a blank.gif. I tried to overwrite that with that code, but it didn’t work.
Let me know what you would need to see to troubleshoot.
Thanks!
The topic ‘Default thumbnail doesn’t appear’ is closed to new replies.