Skip Navigation

[Resolved] How can I add taxonomy terms to the Custom Post Type RSS feed?

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 16 replies, has 2 voices.

Last updated by PaulS4783 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1207450

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You are still echoing the metaValue but you should be echoing the metaDate.

#1207457

Yep. My mistake.
This code works now.
You can close the ticket.
Thanks!

//Adds custom fields to the RSS feed for Events
add_action('rss2_item', 'add_my_custom_field_node');
function add_my_custom_field_node() {
    global $post;
    $metaValue = get_post_meta($post->ID, 'wpcf-start-date', true);
    if(!empty($metaValue)):
        $metaDate = date("d M Y", $metaValue);
        echo("<start-date>{$metaDate}</start-date>");
    endif;
}