Support

Home Forums Event Espresso Premium Customise the ticket_selector_chart.template.php file in EE4

Customise the ticket_selector_chart.template.php file in EE4

Posted: April 20, 2014 at 1:38 pm

Viewing 5 reply threads


Paul Doyle

April 20, 2014 at 1:38 pm

Hi,

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/

Thanks


Lorenzo Orlando Caum

  • Support Staff

April 20, 2014 at 1:54 pm

Hello,

Please use this location:

wp-content/uploads/espresso/templates


Lorenzo


Paul Doyle

April 20, 2014 at 2:17 pm

Excellent!!! … many thanks for the crazy fast response 🙂


Paul Doyle

April 20, 2014 at 2:26 pm

Hhmmm that actually doesn’t seem to be working for me!

Does ticket_selector_chart.template.php go directly into wp-content/uploads/espresso/templates ??


Josh

  • Support Staff

April 22, 2014 at 10:36 am

Hi Paul,

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';
}


Paul Doyle

April 22, 2014 at 12:12 pm

Great, Thanks Josh!

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.

Event Espresso