Results 1 to 2 of 2

Thread: rss feed image

  1. #1
    Thread Starter
    tradeamillion's Avatar
    Join Date
    Mar 2012
    Location
    New York
    Posts
    1,076
    Thanks
    82
    Thanked 12 Times in 12 Posts

    rss feed image

    http://demos.appthemes.com/vantage/feed/

    why vantage feed do not include image in rss feed?

    had to add this to function
    are you guys including it in next update?

    function insertThumbnailRSS($content) {
    global $post;
    if(has_post_thumbnail($post->ID)){
    $content = ''.get_the_post_thumbnail($post->ID, 'thumbnail', array('alt' => get_the_title(), 'title' => get_the_title(), 'style' => 'float:left;')).''.$content;
    }
    return $content;
    }
    add_filter('the_excerpt_rss', 'insertThumbnailRSS');
    add_filter('the_content_feed', 'insertThumbnailRSS');

    add_action('rss2_item', function(){
    global $post;

    $output = '';
    $thumbnail_ID = get_post_thumbnail_id( $post->ID );
    $thumbnail = wp_get_attachment_image_src($thumbnail_ID, 'thumbnail');
    $output .= '<post-thumbnail>';
    $output .= '<url>'. $thumbnail[0] .'</url>';
    $output .= '<width>'. $thumbnail[1] .'</width>';
    $output .= '<height>'. $thumbnail[2] .'</height>';
    $output .= '</post-thumbnail>';

    echo $output;
    });
    Computers are incredibly fast, accurate, and stupid: humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination.

  2. #2
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Jomark Help with store image in rss feed posts
    By khriz in forum Help Using Clipper
    Replies: 7
    Last Post: March 3rd, 2015, 12:17 PM
  2. Replies: 4
    Last Post: April 16th, 2013, 03:23 PM
  3. Need help to edit classipress RSS feed to include media image
    By cswebtech in forum ClassiPress General Discussion
    Replies: 3
    Last Post: November 25th, 2011, 11:05 AM
  4. RSS feed with image from ad-listing
    By dionf in forum ClassiPress General Discussion
    Replies: 2
    Last Post: July 18th, 2011, 05:47 PM
  5. [MOD NEEDED] XML feed import - featured image
    By andreas in forum ClassiPress General Discussion
    Replies: 7
    Last Post: September 14th, 2010, 08:20 AM