ACF field in rss?
-
Hi,
a question. Is it possible to output an ACF field in the RSS?
I created a new “subtitle” field for the posts. This should now be published in the RSS.Is this possible? I can already output the featured image via function.php.
// Add featured image to RSS feed
add_filter(‘the_excerpt_rss’, ‘j0e_imagetoRSS’);
add_filter(‘the_content_feed’, ‘j0e_imagetoRSS’);function j0e_imagetoRSS($content)
{
if (has_post_thumbnail()) {
$content = ‘‘ . get_the_post_thumbnail($post->ID, ‘full’, array(‘style’ => ‘max-width: 50%; height: auto; margin-bottom: 10px;’)) . ‘
‘ . $content;
}
return $content;
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘ACF field in rss?’ is closed to new replies.