How do you make a custom rss feed for upcoming events?

Home Forums Calendar Products Events Calendar PRO How do you make a custom rss feed for upcoming events?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12729
    Greg
    Participant

    I can access a very basic rss feed for events this way:
    http://sampledomain.com/feed/?post_type=tribe_events

    But, it only shows the event title and the post date (sorted by post date). I’d like to make a custom feed that shows specific information related to upcoming events (ie. the next 5 events based on the current date as an example). Any idea how I can do this?

    #12749
    Jonah
    Participant

    Hi Greg,

    I’m sure this is possible but you’ll have to read up on customizing feeds in WordPress to figure out how to do it or hire a developer to help you with this. You might want to start here: http://codex.wordpress.org/Customizing_Feeds

    #13088
    clearwater
    Participant

    This may be along the same lines – but how can I add my events to the *main* rss feed for the site? I’d like to continue listing them in the feed as previous versions of the plugin did, without having to modify any core wordpress files or the lik. Thanks!

    #13123
    Jonah
    Participant

    Hey L,

    Try adding this to your functions.php file in your theme:


    function add_cpts_to_rss_feed( $args ) {
    if ( isset( $args['feed'] ) && !isset( $args['post_type'] ) )
    $args['post_type'] = array('post', 'tribe_events');
    return $args;
    }

    add_filter( 'request', 'add_cpts_to_rss_feed' );

    Feel free to add any other post types to the array for other things you want in your RSS feed.

    – Jonah

    #13313
    clearwater
    Participant

    Thanks Jonah, worked great!

    #13315
    Jonah
    Participant

    Awesome, glad to hear!

    #975274
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘How do you make a custom rss feed for upcoming events?’ is closed to new replies.