Posted: August 19, 2016 at 8:31 am
Im looking to filter my events using the tag taxonomy instead of categories in the table view. Im using the category taxonomy to show different lists of events on different pages. I see there is a currently a way to filter the events by category that utilizes the function/argument espresso_event_categories to grab all categories. Im wondering if there is a similar function that grabs all tags.
Alternatively, if there is a better/different way to create separate event lists and use shortcodes to display them.
WordPress includes a tag archive. Here’s a link to some documentation:
So how that works in EE4 is when you tag some events with the same tag, they’ll all appear in that tag’s archive, which will have this URL structure:
One thing to keep in mind though: If you have events and regular WP posts that are given the same tag, they’ll both appear in the same tag archive.
Right, which is why I was wondering if theres a way to pull only the event tags. But it seems like the tags are batched in with all of wordpress.
But I did manage to work out a way to grab some of the event tags, but just not sure how to get them all in one array rather than printing out per post.
Im using the table-template add-on, and in the loop there was a conditional that grabbed the category of each post and printed it onto the wrapper class:
And i modified that to grab the events tags:
is there a similar method that would let me get ALL the tags that the events are using into an array? Im trying to print out checkboxes and filter via tag values.
The support post ‘Filter events by tags instead of category’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.