Support

Home Forums Event Espresso Premium Single Event Template customization

Single Event Template customization

Posted: August 15, 2019 at 5:10 pm


Somatic Practice

August 15, 2019 at 5:10 pm

Hi, I’ve read through the forums and followed the steps to get a new Single Event template, and it’s working, for the most part. I’m calling the EE content with this line in the template (it replaced the_content(); in the Avada Single post template): <?php espresso_get_template_part( ‘content’, ‘espresso_events’ );?>

I also added the filter that tells EE to use the custom ordering.

However, when I view an event, it seems that the content is duplicated. Here’s an example: http://somaticpractice.flywheelsites.com/events/touch-skills-trainings-for-trauma-therapists-vancouver-2020/

Please let me know how I can solve this. Thanks!


Tony

  • Support Staff

August 16, 2019 at 3:27 am

Hi there,

I also added the filter that tells EE to use the custom ordering

Which filter are using for this?

I’m guessing your using the old method to change the order which will basically mean your injecting the content after EE already has. If you can post the code you are using I can confirm and go from there.

  • This reply was modified 4 days, 13 hours ago by  Josh.


Somatic Practice

August 16, 2019 at 1:23 pm

The filter I am using is this: add_filter( ‘FHEE__EED_Event_Single__template_include__allow_custom_selected_template’, ‘__return_true’ );

Let me know if you need anything else. Thanks!


Tony

  • Support Staff

August 19, 2019 at 4:42 am

Hmm, no that’s not the old method.

So with the above EE injects the event details into the_content() when using a custom template so you don’t need to call espresso_get_template_part( ‘content’, ‘espresso_events’ ) you just call the_content()

Calling the template files directly would mean you are taking over full control of the template yourself and wouldn’t want EE to also inject the details (which is what the above filter is doing).

Switch back to simply calling the_content(), does it work for you then?

If not can you post the contents of your template to Pastebin and add a link here so I can view it?

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 day, 17 hours ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!