Hi,
I have a custom post type with a number of custom fields, including some image fields. I have created a custom RSS feed for the CPT and I would like to include the images within the RSS feed. I've tried Advanced Images, Single Images, etc but I don't know how to get the images to show in the feed. The best I have got is the image ID to show.
The code snippet I am using for one of the image custom fields is is as follows:
add_action('rss2_item', 'add_custom_field5_to_rss');
function add_custom_field5_to_rss() {
if(get_post_type() == 'holiday-home' && $my_meta_value5 = get_post_meta(get_the_ID(), 'holiday_home_image_03', true)) {
?>
<holidayhomecustomfields:holiday_home_image_01><?php echo $my_meta_value5 ?></holidayhomecustomfields:holiday_home_image_03>
<?php
}
}
I'm assuming I need to get the image URLs to show in the feed instead of the image IDs so can anyone tell me how to modify the code above so the image URL is returned?
Really appreciate any help!
Adam