Venue filter hooks are ignored by the new v2 design list templates
-
Hi,
I wanted to change some venues on past events using a filter. I was able to do so by hooking in the “tribe_get_venue_id” filter and change the venue id of the event.
In the old layouts (before the v2-templates where used) both the list view and the single view now show the venue contact data of the filtered venue, exactly what I wanted. And also the json schema is changed the same way.
Now I do the same after switching to the newer v2 templates and it doesn’t work anymore. The template gets the data from an event object, but this object isn’t affected by the venue filters.
But the json data still is affected by the filter, so now, when I do the same in the event list view, the list presents the unfiltered venue to the visitor, while the json venue data is being filtered (so now contains the data I wanted).
And this also constitutes a SEO problem, since now the content of the page conflicts with the json schema.
Using the the “tribe_get_venue_id” filter hook, still works on the single page. Since it still works on most content I think this might be a bug. Is this a bug?
And if not a bug, what other way to filter venues is there when using the v2 templates? There don’t seem to be new filters for the new templates and it would break customization otherwise.
I wasn’t yet able to find where the venue is inserted in the event object and how to filter that, but it seems that the v2 (list-venue) templates no longer use the template tags and are no longer filterable as a result.
So I wonder why it doesn’t work anymore and what is the proposed way of customizing venues in the v2 templates?
Can you help?
Regards,
Hans
- The topic ‘Venue filter hooks are ignored by the new v2 design list templates’ is closed to new replies.