Support

Home Forums Event Espresso Premium Can't get to run single event page template

Can't get to run single event page template

Posted: July 15, 2019 at 4:33 am

Viewing 5 reply threads


adasch

July 15, 2019 at 4:33 am

Hi,
I read so many postings in this forum but still can’t get to run a custom single event page template.

What I did:
I copied the file single-espresso_events.php from plugins/event-espresso-core-reg/public/Espresso_Arabica_2014 to my child theme folder (/themes/Avada-Child-Theme).

Nothing really changed, when I edited the file. My single event looks still the same.

What I’m, trying to do:
– make the header image 100% wide with no padding left and right
– edit the way the dates and times are shown (no icons etc)
– edit the ticket selector “box” (get rid of the table and the quantity selection. just show the price and a “buy” button)
– edit the way a PERSON is shown (edit profile picture ect)
– ADD a new segment (“got questions?”) under every event

But I’m still stuck at the very beginning, as I can’t build my own template.

Can you give me some starting help? I’d really appreciate it!
Thanks!

andy


Tony

  • Support Staff

July 15, 2019 at 5:20 am

I copied the file single-espresso_events.php from plugins/event-espresso-core-reg/public/Espresso_Arabica_2014 to my child theme folder (/themes/Avada-Child-Theme).

The template files from Espresso_Arabica_2014 are based on the twentyfourteen theme, so non of your classes will match when you do that, those templates are theres to give you an example of how to structure custom templates. Creating the above template should still mean that template is used, but it likely shouldn’t still look the same as it did.

Its been a while since I’ve event looked over Avada, if you’d like to send me a copy of the theme I’ll take a quick look as see how its loads. You’ll need to host the .zip somewhere and post the URL for it here (you can set the post to private if preferred).

What you need to do is copy Avada’s single.php, rename the copy to single-espresso_events.php and place that in your child theme. That means you have a child template loading which is exactly the same as what your theme usually uses, then you edit from there, but…. if Avada loads the templates in a different way you’ll need to copy how it loads the files.

Note that some of the customizations you are looking for above will require some in-depth custom work, we can’t provide support for that but can help get you on start on the above.


adasch

July 15, 2019 at 6:37 am

Hi Tony, ok, I got it so far.
I just copied the single.php from /Avada to /Avada-Child-Theme and renamed it as you said.
(I already selected the child theme in the backend as I made other changes to the tempalate. So it’s defenitely selected).

But – as you expected – the new single-espresso_events.php is not loaded. I’ll send you an Avada link. THANKS for looking into it.


adasch

July 15, 2019 at 6:38 am

This reply has been marked as private.


Josh

  • Support Staff

July 15, 2019 at 12:51 pm

Hi Andy,

It’s not evident from looking at the Avada theme why you’re having trouble with loading a custom template. I should let you know that loading a custom template isn’t necessary or recommended in this case anyway. This is because the customizations would happen outside of the single template.

Here’s a breakdown of each of the customizations and how they can be done:

– make the header image 100% wide with no padding left and right
That’s done with CSS

– edit the way the dates and times are shown (no icons etc)
You copy the espresso_list_of_event_dates() function from Event Espresso core into a plugin or into your child theme’s functions.php file, and make edits to your copy.

– edit the ticket selector “box” (get rid of the table and the quantity selection. just show the price and a “buy” button)

This isn’t recommended, but if you must you can add some jQuery so the ticket quantity input is always set to 1, and hide it (and hide everything else with JS or CSS)

– edit the way a PERSON is shown (edit profile picture ect)
You copy the content-espresso_events-people.php template from the people add-on into your WP child theme, and edit the copy.

– ADD a new segment (“got questions?”) under every event
This is best done using an action hook.
AHEE_event_details_after_post is an example of one of the hooks you can use. There are other hooks available, and one way to find the hooks that are exposed on the event page is install the debug bar plugin + the debug bar actions and filters add-on:

https://wordpress.org/plugins/debug-bar-actions-and-filters-addon/


adasch

July 17, 2019 at 3:54 am

Thank you Josh. I got almost everything done without a new template file. 🙂

Viewing 5 reply threads

The support post ‘Can't get to run single event page template’ 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