Support

Home Forums Event Espresso Premium Double Display of Datetimes and Ticket Selector with Custom Single Event Templat

Double Display of Datetimes and Ticket Selector with Custom Single Event Templat

Posted: February 9, 2017 at 8:20 pm

Viewing 2 reply threads


naddi

February 9, 2017 at 8:20 pm

I am using a custom single-esspresso_events.php file. I’ve added the following code to a custom ee plugin:

add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );

My understanding is that this tells EE to continue to use the custom ordering even when you are using the single-espresso_events.php template file.

However, when I include this code in my customization plugin, the ticket selector and date times display twice on my single event page.

Has anyone seen this before or have ideas on how to fix?


naddi

February 9, 2017 at 8:21 pm

Quick note: the correct file name I am using is single-espresso_events.php


Tony

  • Support Staff

February 10, 2017 at 4:33 am

Hi there,

My understanding is that this tells EE to continue to use the custom ordering even when you are using the single-espresso_events.php template file.

Whilst that is correct, there is a little more to it than that.

When you use a custom template like you have you have full control of the output for the event, you can call in all the individual templates in whichever order you prefer. Because of that, when EE detects you are using a single-espresso_events.php template file it stops injecting the details into the_content (which is how the details are added by default).

The filter you posted forces EE to continue to do that and follows the ordering you have set within Event Espresso -> Events -> Templates when doing so (the custom ordering).

So if you comment out the above filter and retest, do you only see a single set of details?

Did you just copy the single-espresso_events.php template file from \event-espresso-core-reg\public\Espresso_Arabica_2014\ and place that within your theme or did you create a copy of your themes single.php template and rename it?

If you post the contents your single-espresso_events.php template file to a gist or pastebin so we can take a look we may be able to see whats happening from there.

Viewing 2 reply threads

The support post ‘Double Display of Datetimes and Ticket Selector with Custom Single Event Templat’ 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