thumbnail based on feed URL
-
I would like to use a thumbnail based on the feed’s URL instead of using the the rss item’s thumbnail or the default icon.
I can save these files to a specific location (ie blog.com/images/feedzy/[url].jpg)
I’m trying to sort out how to do this with a filter. Here’s what I tried, but it doesn’t seem to work. (do I have to wait for the cache to rebuild? can I force it to re-cache?)
function SDM_feedzy_insert_feed_icon( $content, $feedURL ) { $base_url = '/images/feedzy/' ; $thm_class = preg_replace("/[^A-Za-z0-9 ]/", '', $feedURL) . '.jpg'; $content = '' $base_url . $thm_class . '' . $content; return $content; } add_filter( 'the_excerpt_rss', 'SDM_feedzy_insert_feed_icon' ); add_filter( 'the_content_feed', 'SDM_feedzy_insert_feed_icon' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘thumbnail based on feed URL’ is closed to new replies.