Support

Home Forums Event Espresso Premium Avada Theme is displaying Event details in Page Header

Avada Theme is displaying Event details in Page Header

Posted: March 18, 2022 at 5:03 pm

Viewing 13 reply threads


Burnt Orange Design

March 18, 2022 at 5:03 pm

When I click on an even to view event details, instead of displaying the Global Header, the event details are displayed in the area where the header should be. It’s also showing in the page content section, where it should be. I’m using the Avada theme with the latest version. I’m also using the latest version of EE. Any idea why this would be happening. I’ve used EE with Avada before with no issues, but not sure why this is happening now.
m2volleyballacademy.com/camps


Tony

  • Support Staff

March 21, 2022 at 4:53 am

Hi there,

Are you using Avada layout templates?

In short, Event Espresso hooks into the_content to inject the event details into the page and we recently had another report of issues with Avada doing the same thing when using the layout editor. Turns out Avada runs the_content multiple times so EE injects the event details multiple times and the above happens.

I created a snippet to hook into Avada an prevent that from happening:

https://gist.github.com/Pebblo/bb0c36c05392a3b91ea1c635fcaa794d

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

With that on the site does it work as expected then?


Burnt Orange Design

March 21, 2022 at 7:25 am

Thanks Tony. I added the code using the instructions in the wiki, but the plugin isn’t showing up in the list of plugins. This site is part of a Multisite network, but it’s the only site on the network using EE. Is there something special I have to do since it’s in a multisite network to make the plugin show up?


Tony

  • Support Staff

March 21, 2022 at 7:35 am

No, the contents of the plugin file to say PasteBin so I can take a look?

https://pastebin.com/

Include the whole plugin file and I’ll double-check it’s set up correctly.


Burnt Orange Design

March 21, 2022 at 7:42 am

The pastbin is here: https://pastebin.com/N9D5Uej5


Tony

  • Support Staff

March 21, 2022 at 7:52 am

Seems Askimet doesn’t like you ๐Ÿ™‚

The posts were flagged for spam, I’ve unspammed them (to help with your score) and then trashed the duplicates.

That file looks fine, I packaged it up as a plugin and zipped it, shouldn’t make a difference really but try this:

https://eventespresso.com/wp-content/uploads/2022/03/ee-avada-header-fix.zip

That link will expire shortly but let me know if the zip works for you.


Burnt Orange Design

March 21, 2022 at 8:13 am

Ok got it, thanks ๐Ÿ™‚
I was able to get the plugin to display in the list using the .zip file. Once I activated that plugin on the site, the header and page title show correctly, but the ticket selector was no longer displayed. I also got an error on the event archives page (m2volleyballacademy.com/camps):

No configuration section has been provided while attempting to save “_Config”. EE_Config – _verify_config_params – 551


Tony

  • Support Staff

March 21, 2022 at 9:24 am

Ok, so de-activate that plugin again, does the above stop?


Burnt Orange Design

March 21, 2022 at 9:25 am

Yes, the errors and issues stop when that plugin is de-activated.


Burnt Orange Design

March 21, 2022 at 9:48 am

I edited my Layout to remove the Content section and now the ticket selector and header are displayed properly on the Event Details page. The only problem I’m still having is on the page with the ESPRESSO_EVENTS shortcode. This is my shortcode:

[ESPRESSO_EVENTS css_class="event-boxes col-lg-3 col-md-3 col-sm-6" limit="20"]


Burnt Orange Design

March 21, 2022 at 9:48 am

That shortcode is displayed on the /camps page.


Burnt Orange Design

March 21, 2022 at 10:18 am

Ok, it looks like the issue is when Event Details are displayed inside an Avada Layout Content section. It displays fine if I don’t have the Content section of the Avada Layout active. The only problem is that I need a sidebar displayed on the Event details screens. Is there a way for me to just add a sidebar?


Tony

  • Support Staff

March 21, 2022 at 1:33 pm

My apologies but I’m not sure I follow.

Can you add some more details on this? I don’t use Avada but do have a copy that was sent over by another user for a similar issue (which is where I come up with the snippet I gave you).

Just to note, Avada is doing something out of the ordinary here and whilst I’ll happily help if I can I can’t guarantee a fix for this as it stands as running the_content multiple times like this is not really expected.


Burnt Orange Design

March 21, 2022 at 1:40 pm

Hi Tony,
I basically just want to add a sidebar to the Event Details screens. I thought these pages would use the same settings as blog posts, but they don’t in Avada.

Viewing 13 reply threads

The support post ‘Avada Theme is displaying Event details in Page Header’ 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