Support

Home Forums Event Espresso Premium Conflict between EE4 and Hydrogen Theme

Conflict between EE4 and Hydrogen Theme

Posted: October 2, 2018 at 6:14 am


swinkelmann

October 2, 2018 at 6:14 am

I am having a conflict between EE4, Gantry5 and the Hydrogen Theme. On the single event page the ticket selector doesn’t show up. I have the box checked to show it. I saw a couple of posts in the forums that addressed older versions of these that included timber, but it seemed there was no solution. It works correctly with the default wp theme.

EE4 – 4.9.67.p
Gantry5 – 5.4.26
Hydrogen Theme – 5.4.26


Josh

  • Support Staff

October 2, 2018 at 1:13 pm

Hi,

I looked into this and the conflict appears to be the result of the way the Gantry plugin replaces the WordPress post object with its own version of a post object.

For example, you can see how the ticket selector will show up if you open up the Hydrogen theme’s single.php file and add this just before the Timber::render() call at the end of the file:
$post = get_post($post->ID);

While the above change will make the ticket selector display while using the Hydrogen theme, it’s more of a point in the direction of where something needs to be fixed than a viable solution. Ideally, the Gantry5 plugin should leave the WordPress post object unaltered, and maybe do a copy of the post object for its purposes.

The way forward will be to contact RocketThemes to see if they can allow an unaltered WordPress post object. If not you’ll likely run into other problems on the site.


Josh

  • Support Staff

October 2, 2018 at 2:46 pm

Another approach you could take which would eliminate potential conflicts with the modified $post object, would be to create a child theme
(follow this guide:
http://docs.gantry.org/gantry5/theme-development/create-child-theme-wordpress)

Then, you’ll add a single.php file to the child theme and place this code into the child theme’s single.php file:
https://gist.github.com/joshfeck/cffca80358305709025f08979de85a60


swinkelmann

October 2, 2018 at 3:03 pm

Thank you! I will try this now.

The support post ‘Conflict between EE4 and Hydrogen Theme’ 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