This question has been asked before here, but not really answered properly…
I need to make some substantial php/html changes (not just css overrides) to ticket_selector_chart.template.php. Obviously I would rather not edit the original file….. is there a way to include a copy of this file in my theme folder to override the original file which is located in /modules/ticket_selector/templates/
The custom template can go where ever you’d like, but in order to load from an alternate location you will need to specify the location using a filter. You add the function that uses the filter to a custom snippets plugin or your theme’s functions.php file. Here’s an example function that tells EE to use the template in the /wp-content/uploads/espresso/templates 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 WP_CONTENT_DIR . '/uploads/espresso/templates/ticket_selector_chart.template.php';
}
Alternatively you could return your theme’s directory as the location to load your custom ticket selector template with:
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';
}
I gotta say, as a first time user of your system, so far, it’s a joy to work with …. and great support too …. Keep up the great work!
Many Thanks!
Viewing 5 reply threads
The support post ‘Customise the ticket_selector_chart.template.php file in EE4’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.