Event Tags Custom Taxonomy

Home Forums Calendar Products Filter Bar Event Tags Custom Taxonomy

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1105033
    Cory Fechner
    Participant

    We 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.

    #1105568
    Nico
    Member

    Hi 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,
    Nico

    #1105574
    Cory Fechner
    Participant

    Nico,

    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?

    #1106042
    Nico
    Member

    Hey 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,
    Nico

    #1106058
    Cory Fechner
    Participant

    Nico. Awesome looking forward to testing it.

    Is this something I place in global functions file or somewhere with-in the events filter plugin?

    #1106630
    Nico
    Member

    Cory, 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,
    Nico

    #1112749
    Support Droid
    Keymaster

    This 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Event Tags Custom Taxonomy’ is closed to new replies.