Skip Navigation

[Resolved] Customising RSS Feeds

This support ticket is created 5 years, 1 month 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by matthewL-7 5 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1358899

Hey,

Is there a simple way with Toolset to do any of the following that I am possibly missing. I am trying to get an RSS feed to include custom fields and ordered by a custom field date.

1) An RSS feed for a view? As the view is in the correct order already.

2) Customise the RSS feed for a post type to be ordered by a custom field?

I have figured out how to add custom fields into an RSS feed relatively easy so that is fine its just the ordering by a custom field that is a date I can't figure out. Maybe its not possible, or easy?

For reference if anyone sees this thread to add custom fields to an RSS feed Custom post type, see the code below to bye added (must replace cpt_name_here and wpcf-field-name):

add_action('rss2_item', 'yoursitename_rss2_item');
function yoursite_rss2_item() {
  if (get_post_type()=='cpt_name_here') {
    $fields = array( 'wpcf-field-name', 'wpcf-field-name', 'wpcf-field-name' );
    $post_id = get_the_ID();
    foreach($fields as $field)
      if ($value = get_post_meta($post_id,$field,true))
        echo "<{$field}>{$value}</{$field}>\n";
  }
#1359239

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Matthew,

I have some bad news on this one.

Unfortunately there isnt a way in Toolset to organise the RSS feed by a custom field or even add a view to an RSS feed.

The rss feeds are pulling directly from the database using the wordpress API.

However I did do some research on this and found this plugin below.
https://wordpress.org/plugins/custom-simple-rss/

Please try this and let me know if it helps.

Thanks,
Shane

#1359683

Ah that is a shame but thanks for explaining. 🙁

Cheers. I will close this off.