Home › Forums › Calendar Products › Events Calendar PRO › Filter Calendar by User Custom Fields
- This topic has 4 replies, 2 voices, and was last updated 11 years, 5 months ago by
Geoff.
-
AuthorPosts
-
November 16, 2014 at 1:45 am #886712
corre
ParticipantI 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?
November 17, 2014 at 9:20 am #887919Geoff
MemberHi 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!
GeoffNovember 24, 2014 at 10:08 am #897217Geoff
MemberHey 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!
GeoffNovember 24, 2014 at 9:40 pm #897898corre
ParticipantI 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”.
November 25, 2014 at 7:41 am #898194Geoff
MemberThanks, 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 -
AuthorPosts
- The topic ‘Filter Calendar by User Custom Fields’ is closed to new replies.
