Home › Forums › Calendar Products › Events Calendar PRO › Attribute a Default Category to Organizers and Venues
- This topic has 3 replies, 2 voices, and was last updated 12 years, 2 months ago by
Brook.
-
AuthorPosts
-
February 24, 2014 at 5:26 am #108593
fred
Participant-Can I put attribute the Organizers and Venues to certain Default Categories? i.e. anytime there is a new event by that Organizer or Venue it’s automatically tagged to the default Category.
-Can I set the calendar to display only certain category events depending on what page it is? My website has a main category filter, so only posts in the category selected in the filter show on the page. We want the Events Calendar to be receptive or responsive to the selected category in the category filter,
February 25, 2014 at 8:42 am #109138Brook
ParticipantHowdy fred,
Can I put attribute the Organizers and Venues to certain Default Categories?
This is certainly doable, though it will require some programming. To add additional information to a post, like its venue, I would hook into the WP Filter ‘save_post’ with a priority of 17 or greater. The reason for the priority is that most of our save_post hooks have a priority of 16, and you would want to run your code after them. Simply detect what the event category is, and set the Organizer/Venue data from this filter. You might also check to see if those fields are blank, that way you can still specify something other than the default from the Add Event screen if you choose.
Can I set the calendar to display only certain category events depending on what page it is?
You can certainly do this as well. I have a snippet of code that hides a category of events based on the user role, but if you are quite familiar with PHP it can easily be modified to hide categories based on some other criteria. If you need to detect the type of calendar page, use our tribe_is_ series of functions, a list of which can be found on this page in the left-hand pane. Or, if you are trying to detect something else like a page’s ID, then you would need to refer to the WP API for that.
If you were hoping that this could be done without programming, then I am sorry that I have to deliver bad news. If you are not a programmer yourself and do not know someone whom you can hire, have no fear. We actually keep a list of freelancers who are quite capable of making changes on your behalf. You can obtain this list by emailing [email protected] and requesting it.
Does that make sense? Will that work for you? Please let me know. Cheers!
– Brook
February 25, 2014 at 9:37 am #109161fred
ParticipantThanks Brook!
February 25, 2014 at 10:30 pm #109540Brook
ParticipantYou are welcome!
-
AuthorPosts
- The topic ‘Attribute a Default Category to Organizers and Venues’ is closed to new replies.
