Support

Home Forums Event Espresso Premium How to override /admin_pages templates?

How to override /admin_pages templates?

Posted: September 27, 2016 at 12:55 pm


Meet Me In The Cloud

September 27, 2016 at 12:55 pm

As an example, I am trying to override /event-espresso-core-reg/admin_pages/registrations/templates/registration_page_registration_questions.template.php

By creating a file at wp-content/uploads/espresso/templates/registration_page_registration_questions.template.php

But it is still display the plugin version. What am I doing wrong?


Josh

  • Support Staff

September 27, 2016 at 1:28 pm

Those admin templates are actually not overridable where a template from the /uploads/wp-content/ folder will be automatically checked.

Ideally, you’d use an action or filter hook to make changes. If there isn’t a hook in the location that you need, you can submit a pull request for a filter hook (to change existing content) or an action hook (to add new content) to the admin pages. We invite you to submit that pull request to our github project:

https://github.com/eventespresso/event-espresso-core/


Meet Me In The Cloud

September 28, 2016 at 1:27 pm

What about /eea-multi-event-registration/templates/widget_minicart_table.template.php ?


Josh

  • Support Staff

September 28, 2016 at 2:10 pm

There’s a filter hook that lets you add your custom template into the mini cart widget template selector. Example code follows:

add_filter('FHEE__EEW_Mini_Cart__form__minicart_templates', 'my_custom_mer_mini_cart_template', 10, 1 );
function my_custom_mer_mini_cart_template( $minicart_templates ) {
	$newtemplate = get_stylesheet_directory() . '/my_new_template.template.php';
	array_push( $minicart_templates, $newtemplate );
	return $minicart_templates;
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


Meet Me In The Cloud

September 30, 2016 at 3:14 pm

How about eea-multi-event-registration/templates/event_cart.template.php ? 🙂


Josh

  • Support Staff

October 1, 2016 at 8:52 am

What about it? There are filter hooks within the template, are you looking to change something that’s not wrapped in an apply_filters() function?

The support post ‘How to override /admin_pages templates?’ 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