Problem:
The user is using the Event Tickets plugin to sell tickets for events(custom post type). He displays the event using a content template and he got the list of tickets duplicated several times on the page.
Solution:
The Event Tickets plugin is hooking into "the_content" to display the list of tickets.
Toolset replaces the results of "the_ticket" filter with the generated markup from a content template.
Because the user was using content templates inside of the Event content template, the list was displayed after each content template.
To workaround this, instead of including the child content template, or the body with a block, use the wpv-post-body shortcode with the suppress_fitlers argument.
Then, at the bottom of the content template, where we want to display the list of tickets, include an empty content template with a block.
Future versions of Toolset Blocks will allow a content template to be included as a block and will allow us to suppress the filters on it.
Relevant Documentation:
https://developer.wordpress.org/reference/functions/the_content/
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153372
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - | 9:00 – 13:00 |
14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - | - | 14:00 – 18:00 |
Supporter timezone: Africa/Casablanca (GMT+01:00)
This topic contains 16 replies, has 2 voices.
Last updated by 4 years, 5 months ago.
Assisted by: Jamal.