RSS Feed of events filtered by organizer

Home Forums Calendar Products Events Calendar PRO RSS Feed of events filtered by organizer

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1219671
    Matt
    Participant

    Hi,
    I’ve Been using the event feeds to display on other sites such as : [site url]/category/[category]/feed/
    which outputs a useful feed of events filtered by category

    I was hoping when I upgraded to PRO I would get the same for organizers ([your-site]/organizer/[organizer-name]/feed) but it doesn’t seem to work and I can’t find any documentation on it online.

    Can anyone let me know how it could be filtered into a feed?

    #1220352
    Nico
    Member

    Howdy Matt,

    Welcome to our support forums and thanks for reaching out to us. I can help you on this!

    What you describe seems to be true, and there’s no feed output for the organizer page. But there’s a workaround to basically change the query arguments in case there’s a query string indicating the organizer ID.

    For this you’ll need to paste the snippet below in your theme’s (or child theme’s) functions.php file:

    /* Tribe, get feed by organizer ID */
    function tribe_alter_feed ( $query ) {

    if ( !is_feed() || !tribe_is_event_query() ) return;

    // set organizer if passed
    if ( isset ($_REQUEST['tribe_organizer']) ) $query->set('tribe_organizer', (int)$_REQUEST['tribe_organizer']);

    }
    add_action( 'pre_get_posts', 'tribe_alter_feed' );

    This appending an organizer parameter to the URL [site url]/events/feed/?tribe_organizer=16 the change will be triggered.

    Please let me know if this works (bear in mind feeds have a strong cache in WP),
    Best,
    Nico

    #1220837
    Matt
    Participant

    Thats perfect!
    Thanks very much for your help.
    Cheers

    #1220900
    Nico
    Member

    Thanks for the heads-up Matt! Glad I could help you on this 🙂

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘RSS Feed of events filtered by organizer’ is closed to new replies.