Including Custom field link in rss feed
-
I am trying to insert a custom image field link inside a custom XML tag. The link is being inserted into a <description> tag and not the <heroImage> tag.
What am I doing wrong?<?php function fields_in_feed($content) { if(is_feed()) { $hero_image = get_field('hero_image'); $url = $hero_image['url']; $output .= '<heroImage>'. $url . '</heroImage>'; $content = $content.$output ; } return $content; } add_filter('the_content','fields_in_feed'); ?>
https://www.ads-software.com/plugins/advanced-custom-fields/
- The topic ‘Including Custom field link in rss feed’ is closed to new replies.