Filter Calendar by User Custom Fields

Home Forums Calendar Products Events Calendar PRO Filter Calendar by User Custom Fields

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #886712
    corre
    Participant

    I would like to filter the Event Calendar using custom fields I have set to user profiles. For example, John has selected ‘Food’ in his profile custom field, so the calendar will show him fruit-related events while Jane chose “Music” in her profile so the calender will show her events that are tagged to “Music”.

    Btw, fields were configured using BuddyPress so I get them via xprofile_get_field_data(‘Field Name’, $user_id); if that matters.

    How do I approach this?

    #887919
    Geoff
    Member

    Hi there, Ran! Welcome back to the forums. Nice to see you again. 🙂

    Another great question. Just want to note that we’re limited to how much we can help with custom development like this, but let’s see if we can at least get you started in the right place.

    It sounds like you’ve already found a way to call custom fields from BuddyPress. The next thing you might want to do is set up a theme override (more on this in our Themer’s Guide) for the calendar template you are using, then create a custom query for Events posts using tribe_get_events() or simply the default get_posts() in WordPress. You can change the “category” parameter in either query to the BuddyPress custom fields you want them to output.

    Sorry I don’t have a concrete solution for you, but I hope this helps point you in the right direction. 🙂

    Cheers!
    Geoff

    #897217
    Geoff
    Member

    Hey there, Ran! Just checking in to see if there’s been any further update or if you still need assistance on this one–let me know. 🙂

    Cheers!
    Geoff

    #897898
    corre
    Participant

    I haven’t got an email telling me there was a reply on my question so first – sorry for the delay 🙂

    Second, unfortunately I stopped using Tribe’s awesome event calendar and chose coding a calendar on my own. Sometimes modification work can overcome creation work and I’m afraid that’s the case in my situation.

    Thank you for the great support Geoff. You should rewrite your avatar title to “Great Support Team”.

    #898194
    Geoff
    Member

    Thanks, Ran! I’m super sorry the calendar didn’t work out for you, but I totally get it and am glad you find something that suits you. Thanks for working with us here. 🙂

    I’m going to go ahead and close this thread, but please feel free to hit us up with a new thread if any other questions pop up. We’d be happy to help.

    Cheers!
    Geoff

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Filter Calendar by User Custom Fields’ is closed to new replies.