Is there a way to add the thumbnail image url to the wordpress feed??
I know how to add the thumbnail image to the_content, but i need the rss feed to layout a page on another domain. So i was just thinking of using $item->get_title(), $item->get_description() and for the thumbnail something like $item->get_image_url
On the other domain.com i use the following (other domain.com is also a WP install)
require( '../../../site/wp-load.php' );
include_once(ABSPATH . WPINC . '/feed.php');
$rss= fetch_feed('domain.com/feed/?post_type=recipes');
foreach($rss->get_items() as $item) {
echo $item->get_title().'<br/>'.$item->get_description();
echo '<hr/>';
}
any suggestions?
If you want the image url (src)
you have to use first get_post_thumbnail_id to get the thumb id then use wp_get_attachment_image_src to get the image src