WordPress.org

Ready to get started?Download WordPress

Forums

Feedburner and WordPress - Display excerpt and first image. (8 posts)

  1. Susan
    Member
    Posted 3 years ago #

    I'm using feedburner with my wordpress blog.
    I have the feedsmith plugin installed.
    I only want to show excerpts in the feed, not the full post.
    I also would like to show the first image in the feed with each
    excerpt.

    I tried this method:
    http://blog.wardelldesign.com/word-press/add-images-wordpress-feed/
    but there are still no images in the RSS feed.

    Is it possible to show an excerpt and the first image from WordPress
    using Feedburner?

    Thanks

  2. pootor
    Member
    Posted 3 years ago #

    hi, shoesie,
    You can view this output:http://feeds2.feedburner.com/esharecc
    Original post is here:http://eshare.cc
    1.set wordpress Reading Settings in "summary"
    2.edit your theme's function.php, add follow code:

    function diw_post_thumbnail_feeds($content) {
    	global $post;
    	if(has_post_thumbnail($post->ID)) {
    		$content = '<div>' . get_the_post_thumbnail($post->ID) . '</div>' . $content;
    	}
    	return $content;
    }
    add_filter('the_excerpt_rss', 'diw_post_thumbnail_feeds');
    add_filter('the_content_feed', 'diw_post_thumbnail_feeds');

    3.wait Feedburner Re-crawl your feed, about 24 hours

  3. Angie23
    Member
    Posted 3 years ago #

    Hi,

    Where exactly do you add this code?

    I went tho editor>theme functions and added this.

    I went back to the blog and clicked to read a post and
    This is what happend ,my post is not diplaying,just a blank white page with this
    error message:

    <meta name="description" content="
    Fatal error: Call to undefined function has_post_thumbnail() in /home/pola4853/public_html/mysite.ca/wp-content/themes/antisnews/functions.php on line 81

    I am not a techie,I am assuming there is a conflict maybe with thumbnail setting somewhere ?

    Here is exacly where I placed the code

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I would also like to show excerpts & first post picture on feedburner feed
    Grateful for help !
    Thanks

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    You have to put it in functions.php after the opening <?php is fine. It can't be inside another function. Also that function is for displaying images inserted using wordpress' featured image function. That needs to be active in your theme

  5. Angie23
    Member
    Posted 3 years ago #

    Sorry about the paste!

    i just tried putting the code right after

    <?php

    but am still getting the error message/blank page

    And How do I activeate wp featured image function ,please ?

    Thanks

  6. vaseemansari
    Member
    Posted 3 years ago #

    Hello Dear,
    i don't know if the thread is still alive but i also want to do the same thing.

    Here is my blog
    http://www.TodaysBollywood.com
    and here is its feed url
    http://www.TodaysBollywood.com/feed

    Let me tell you that i have created a feed url at
    http://feeds2.feedburner.com/todaysbollywood
    I have set the wordpress reading settings to summary and you can see the first image and post excerpt in feedburner feed at this url http://feeds2.feedburner.com/todaysbollywood.

    Now what i want is, feedburner should send first image and post excerpt to email subscribers but it os not sending.
    You can try it by subscribing to my blog feed at
    http://feedburner.google.com/fb/a/mailverify?uri=TodaysBollywood

    If anyone know the answer and if someone does the same.
    Thanks
    Vaseem Ansari

  7. robscott
    Member
    Posted 3 years ago #

    The code works fine when inputted into our theme's Functions.php file, on WordPress 3.2.

    Was just about to write a little function to do this, so thanks, as ever, the community saves me 10 minutes!

    If it isn't working, there must be a conflict with some plugin or some function already contained within your theme. Try with the default theme, then, if it still doesn't work, try disabling plugins that your think use thumbnailing. Once you identify the plugin that's breaking this function, either, decide if you really need that plugin OR just edit the function to use different terms.

    Hope you can all get this working - it's helping us to publish via RSS to our Facebook page, yet going through Feedburner, and still using an image, without giving the sploggers access to full text RSS.

    Highly recommended functionality, in other words, which should probably enter the core at some point!

  8. deals4dummies
    Member
    Posted 2 years ago #

    robscott - thank you so much for this. worked for me!

    I'd just like to ask is there a way to make all the image sizes displayed consistent? Like where/how would I add something like "image width=250"

    Thanks for your help!!

Topic Closed

This topic has been closed to new replies.

About this Topic