Home › Forums › Calendar Products › Filter Bar › Event Tags Custom Taxonomy
- This topic has 6 replies, 3 voices, and was last updated 9 years, 11 months ago by
Support Droid.
-
AuthorPosts
-
April 20, 2016 at 12:47 pm #1105033
Cory Fechner
ParticipantWe created a custom taxonomy “Event Tags” as we did not want blog tags and event tags joined together.
My question is how do we get the filter bar to pull the new “Event Tags” in the tags filter VS the normal tags.
Do we need to edit the Tag.php file in the plugin filters/Tag.php – or do we need a custom function?
We really need a solution, as we need events tags and blog tags separated.
See attachments.
April 21, 2016 at 12:06 pm #1105568Nico
MemberHi Cory,
Thanks for getting in touch! I’ll help you here…
So, one way of achieving this might be by creating a PRO additional field for the ‘event tags’ instead of a new taxonomy. FilterBar supports additional fields, and creates a list of values from all the events that have something in this field.
Do you think this might work for your project?
Do we need to edit the Tag.php file in the plugin filters/Tag.php – or do we need a custom function?
Editing the core files is never advised, also the edits will be overwritten when the plugin updates. So you’ll need to custom code this, here’s an old example that will surely help if you decide to build this.
Please let me know about it,
Best,
NicoApril 21, 2016 at 12:17 pm #1105574Cory Fechner
ParticipantNico,
Thanks. Although adding a PRO custom field will not allow us to tag events with common tags like the normal tags work. We want that some tag functionality but want blog tags and event tags separated.
So we can tag events something like christmas or swimming and user can filter by those tags to see events related to those tags. AND NOT have to see christmas or swimming blog posts and also the events tag filter not showing tags with no events like it is currently. Currently our blog has hundreds of tags and the event calendar will have far less then that.
Did you see the screen shot I attached last?
April 22, 2016 at 11:27 am #1106042Nico
MemberHey Cory,
Thanks for following-up, and for clarifying about the additional fields. Indeed I’ve seen the screnshoots, I just was trying to find the simplest solution.
So the way to go here would be to create a custom filter for you ‘event tags’ taxonomy, the code would look like this:
https://gist.github.com/niconerd/cfed2d119cba033d2a4314b215f0ffe8
I haven’t heavily tested it and won’t be able to support this script. It’s just intended to get you started, but hopefully it will work!
Please let me know about it,
Best,
NicoApril 22, 2016 at 11:51 am #1106058Cory Fechner
ParticipantNico. Awesome looking forward to testing it.
Is this something I place in global functions file or somewhere with-in the events filter plugin?
April 25, 2016 at 7:46 am #1106630Nico
MemberCory, thanks for the heads-up!
The snippet should be placed in you theme (or child theme) functions.php file, located at wp-content/themes/active_theme_name/functions.php. Sorry for missing this part!
In the script there’s a sample taxonomy definition I’ve added for it to work as a standalone sample, but you can clear it out and just replace this sample name ‘taxonomy’ for the name of the custom tax you are currently using.
Best,
NicoMay 10, 2016 at 9:35 am #1112749Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Event Tags Custom Taxonomy’ is closed to new replies.
