• Can I show RSS feed (thumbnails) on my sidebar using HTML code?
    I don’t want to use Plugin. I tried with RSS widget but there is no images on posts.

    Also with this php code on functions.php file

    function featuredtoRSS($content) {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
    $content = ‘<div>’ . get_the_post_thumbnail( $post->ID, ‘medium’, array( ‘style’ => ‘margin-bottom: 15px;’ ) ) . ‘</div>’ . $content;
    }
    return $content;
    }

    add_filter(‘the_excerpt_rss’, ‘featuredtoRSS’);
    add_filter(‘the_content_feed’, ‘featuredtoRSS’);

Viewing 1 replies (of 1 total)
  • Hi aylya,

    First, the the_content_feed and the_excerpt_rss filters is for your “own” RSS feeds.
    They aren’t filters for your RSS widgets.

    You can’t do with just HTML code for this.

    If you don’t want to use any plugins (I can’t seem to find one either), you’ll need to create a custom widget using the Widgets API for this. And of course, you need to understand PHP as well.

    Also, it won’t stop here either. The RSS feeds you’re trying to get and display on your sidebar (using custom widgets) have to be enabled for thumbnails too. Assuming your RSS source is also running WordPress, by default, WordPress do not display thumbnails on RSS feeds.

    So it will depend on your source to have it enabled the thumbnails on their site’s RSS.

    Hope this explains.

Viewing 1 replies (of 1 total)
  • The topic ‘RSS feed on sidebar using HTML code’ is closed to new replies.