Support

Home Forums Event Espresso Premium Single Event Page layout (which files)

Single Event Page layout (which files)

Posted: September 24, 2017 at 12:34 am


rhumphrey

September 24, 2017 at 12:34 am

Good Afternoon, a hopefully quick question for you. so i understand that each event has a URl associated with it, which is also picked up as structured markup inside google search results. here is a link to an event that is being picked up from google

https://lagaligoliveaboard.com/itinerary/komodo-jurassic-6d5n-2/

as you can see it is not like our layout we have defined on our pricing page
Here;

https://lagaligoliveaboard.com/liveaboard-pricing

what files do i need to edit so each of the single events can be customized to resemble our layout on the pricing page for individual events.

many thanks


Josh

  • Support Staff

September 25, 2017 at 9:47 am

Hi there,

You’ll edit your active WordPress theme’s single.php template file.


rhumphrey

September 26, 2017 at 1:21 am

hi i have looked at the single.php file the issue i have is it affects all the blog posts as well. so if i modify this file to work with the single event, it will screw with my blogs, what do you advise.


Tony

  • Support Staff

September 26, 2017 at 1:29 am

Copy your single.php template and rename the copy to single-espresso_events.php

That new template file will only be used for single EE events.


rhumphrey

September 26, 2017 at 1:52 am

ok, thanks


rhumphrey

October 2, 2017 at 8:51 pm

Hi

i have a copy of the single-espresso_events.php in my child theme, if i edit this that works, but this is not displaying the event content information, if i remove the single-espresso_events.php file so everything is back to normal, i can see the ticket selector on that page, if i then copy single-espresso_events.php the ticket selector is gone. which file do i need to modify to pull in the single event information i have configured.

currently we have everything linked up to the shortcode to list the events on our main pricing page https://lagaligoliveaboard.com/liveaboard-pricing, is there a shortcode that i can use to display only the single events, if so what is it, if not, i have also copied across the content-espresso_events.php do i need to modify this file, which i have tried but nothing is being displayed in the single events page.

if you can please advise on this that would be great.

thanks


Tony

  • Support Staff

October 3, 2017 at 1:40 am

i have a copy of the single-espresso_events.php in my child theme, if i edit this that works, but this is not displaying the event content information, if i remove the single-espresso_events.php file so everything is back to normal, i can see the ticket selector on that page, if i then copy single-espresso_events.php the ticket selector is gone. which file do i need to modify to pull in the single event information i have configured.

When you load a custom template you take full control of the output, so Event Espresso assumes you will also be calling the event details templates manually and no longer injects them into the_content.

However, we have a filter available to tell EE to continue to inject the content for you, add this to your child themes functions.php file:

add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );

Then retest.

currently we have everything linked up to the shortcode to list the events on our main pricing page https://lagaligoliveaboard.com/liveaboard-pricing, is there a shortcode that i can use to display only the single events, if so what is it

I’m not sure I fully understand what you’re trying to do but the only shortcode we have for a single event is the [ESPRESSO_TICKET_SELECTOR event_id=xx] shortcode which loads the ticket selector.

However, if that is to try and work around the above issue within single-espresso_events.php that’s not the correct way to do it.

if not, i have also copied across the content-espresso_events.php do i need to modify this file, which i have tried but nothing is being displayed in the single events page.

What are you doing with content-espresso_events.php?


rhumphrey

October 3, 2017 at 8:01 pm

I’m not sure I fully understand what you’re trying to do but the only shortcode we have for a single event is the [ESPRESSO_TICKET_SELECTOR event_id=xx] shortcode which loads the ticket selector.

Basically i need to change the layout and content for the single event page and as always EE does not make this simple without the need for a developer, so i’m assuming that i need to input all the code into this single-espresso_events.php file to call the required fields i want to display and also customize the layout.

I need each event to look like the events on the main pricing page
https://lagaligoliveaboard.com/liveaboard-pricing
but instead of listing all i only need it to the event tied to that URL path for the event.


Tony

  • Support Staff

October 4, 2017 at 1:43 am

Basically i need to change the layout and content for the single event page and as always EE does not make this simple without the need for a developer

You’re using a highly customized output for the event list (and now single event output), there’s not a lot we can do to prevent the need for a developer if you want to customize the output. We simply can’t set everything in shortcodes or create a ‘page builder’ type addon for EE, we are a small team and so need to focus developments on the features most requested, the ability to customize the output so heavily without the need of a developer is currently not on the agenda for EE.

so i’m assuming that i need to input all the code into this single-espresso_events.php file to call the required fields i want to display and also customize the layout.

single-espresso_events.php is the template used to output the single event details.

Yes all of the code can be input into that file if you want complete control over that output, or, you can use that file to call the_content and EE will inject the event details as it usually does (using the filter I provided above), if you do that you can also edit each of the individual templates EE uses to output the event details.

Each section is broken out into its own template, take a look here for more details:

https://gist.github.com/lorenzocaum/0a35fe4997992fdb1dc5

I need each event to look like the events on the main pricing page
https://lagaligoliveaboard.com/liveaboard-pricing
but instead of listing all i only need it to the event tied to that URL path for the event.

The developer that created that output can split up the content and use the templates from EE (the should be copied to your themes director then edited) or they can add all of the code to single-espresso_events.php to output the details in the way you are requesting.

I have no idea how your original developer created the other output so I can’t provide specific examples on what to break down in what template.


rhumphrey

October 5, 2017 at 12:07 am

no worries, we have got it all sorted now, appreciate your help and we got there finally in the end. thanks again

The support post ‘Single Event Page layout (which files)’ 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.

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: closed

Updated by  rhumphrey 2 years, 1 month ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.