Posted: November 4, 2014 at 9:01 pm
|
Could someone please provide me the correct hook/action filters to use for the following sections in a single event view: – Ticket selector (FHEE__EE_Ticket_Selector__display_ticket_selector__template_path, correct?) |
Hi there, The FHEE__EE_Ticket_Selector__display_ticket_selector__template_path will let you load in an alternate version of the ticket_selector_chart.template.php from a location you specify. Here’s an example of how to use the filter: // lets you load the ticket selector template from another location add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'my_custom_ticket_selector_template_location'); function my_custom_ticket_selector_template_location(){ return get_stylesheet_directory() . '/ticket_selector_chart.template.php'; } With the other three items, I can point you to the actual template files that Event Espresso 4 uses. There may or may not be hooks there you can use for what you’re trying to do. The templates are located in /public/Espresso_Arabica_2014. content-espresso_events-venues.php for Venue location Another approach would be to copy over the Espresso Arabica child theme from the /public folder and convert markup to match your theme, then you can change the markup of those sections regardless of whether there is a filter there or not. |
|
|
Thanks, Josh. So I can copy over the Espresso_Arabica_2014 folder to my theme and espresso will use the files in there instead? |
Yes you can. However please be aware that you’ll need to alter the markup to match your WordPress theme in the templates that are prefixed with loop-, archive-, and single-. The exception to this rule is twentyfourteen, because Arabica_2014 is based on the twentyfourteen theme. |
|
|
Hey Josh, I’ve just now had a chance to tinker with this. I’ve copied over Espresso_Arabica_2014 into my theme and made a change in content-espresso_events-venues.php to verify and it doesn’t seem to be using the file in my theme. I’m using the wp-starter theme, which is a child theme of wp-forge. Does this need to go in the parent theme to work? Also, I didn’t copy the entire public folder in event-espresso-core, just the arabica_2014. Does the public folder need to be included also? |
Hi there, The files within the Espresso_Arabica_2014 folder (not the whole folder) should be copied into the child theme folder. |
|
|
I’ve moved content-espresso_events.php to my theme root folder, and when viewing a single event, single.php does not use this template because get_post_format() does not return anything. If I put this code in single.php:
It will use content-espresso_events.php in my theme, however, on the single event page, the ticket selector, date/times, and google map are all spit out twice. What am i doing wrong? |
|
Scratch that question, I’ve gone a different route. How can I grab the grab the time and date for a particular ticket? For example, in the ticket selector template, I’m adding another column to the ticket selector table for Date and Time. In the ticket loop:
what is the $field parameter supposed to be for those function calls? |
Hi there, One thing to keep in mind is tickets can allow access to multiple date times. So another loop may be in order. If you look further down the ticket selector template, you’ll find another loop that handles the date times. This is the section that gets displayed in the extra “show details” section that displays more details about the tickets. |
|
The support post ‘Hooks/Action Filters for Single Event View’ 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.