Support

Home Forums Event Espresso Premium EE settings overwrite my custom templates

EE settings overwrite my custom templates

Posted: April 17, 2015 at 1:48 am

Viewing 7 reply threads


tigerton

April 17, 2015 at 1:48 am

Hi.

I’ve been using my own templates for archive-espresso_events.php, single-espresso_events.php etc. since v 4.0.

It has worked just fine until one of the latest versions (not sure which exactly). I’m now running v4.6.20.p and strangely the settings for EE in wp-admin now overwrites or adds stuff to my custom templates BUT only when I’m on a event-category archive.

The main archive is fine, no problem there. But as soon as I head to a term archive EE starts messing with my templates. I’ve checked and I’m 100% sure it’s still my template that’s loading.

You can see the differences here:
http://kfsk.se/blog/kurs-konferens/
http://kfsk.se/blog/event-category/samhallsbyggnad/

I’m guessing you’re using some kind of hooks to modify the themes archive which I guess could be a good thing for the common “Hey I installed a theme how do I get EE to work”-person but for a developer like me I need to have full control.

Perhaps you can provide me with the actions/filters you do so I can use remove_action etc. or if you have a better solution?


tigerton

April 17, 2015 at 1:51 am

UPDATE:

Deleting the arabica theme from the plugin removed a bit of the extra stuff that was added. Tho the settings still manage to remove the fact that I have a echo get_excerpt() in the loop.


tigerton

April 17, 2015 at 1:53 am

What kind of sorcery are you pulling off to mess with me like this! :O


Lorenzo Orlando Caum

  • Support Staff

April 17, 2015 at 10:28 am

Hi, the Arabica theme should stop running once you have your own set of template files in your child themes folder.

Event Espresso 4.6.x now uses EEH_Template::locate_template() for loading templates, which will automatically look in the following locations (in order):

The /wp-content/uploads/espresso/templates/(current Event Espresso theme)/ folder for an Event Espresso theme template file

The root of the /wp-content/uploads/espresso/templates/ folder

The /wp-content/plugins/(Event Espresso 4 folder)/public/(current Event Espresso theme)/ folder within the plugin

The /wp-content/plugins/(Event Espresso 4 folder)/core/templates/(current Event Espresso theme)/ folder within the plugin relative to the plugin root: /wp-content/plugins/(Event Espresso 4 folder)/

The above paths work on a “first found = first used” basis.


Lorenzo


tigerton

April 20, 2015 at 1:23 am

Hi,

Sure I can understand that when it comes to EEs own templates such as the invoice (which I guess now is moved to the messages system) or table layout of the checkout. But good old regular WP theme templates like archive-espresso_events and the loop withing shouldn’t go by your locate_template function in that order? I mean, I’m not supposed to put my archive template in the uploads folder I hope?


Lorenzo Orlando Caum

  • Support Staff

April 21, 2015 at 10:06 am

Hi, that is the order as of the recent release. It will look for templates in the first location (starting from top) and then it works its way down the list.


Lorenzo


tigerton

April 21, 2015 at 12:49 pm

Hi,

Yes I understand that but you’re not answering my question. This shouldn’t apply to WP theme templates such as archive.php etc. Or does it? If so that’s kind of bad IMO.


Lorenzo Orlando Caum

  • Support Staff

April 21, 2015 at 1:25 pm

Hi,

The order applies to how Event Espresso checks for a location for a template.

If you do not have an archives_espresso-events.php file (used for event listing page), then Event Espresso will use the archive.php file.


Lorenzo

Viewing 7 reply threads

The support post ‘EE settings overwrite my custom 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