Using RedOlive with Pro

Hi, I’m trying to get RedOlive, https://www.redolive.io/, integrated with the Pro theme but I’m having issues.

It states to add “<?php do_action( 'after_opening_body' ); ?>” in the themes heaper.php file which I’ve done but then I get a error and the site won’t load.

Here is the link with the instructions:

https://www.redolive.io/google-tag-manager-wordpress-plugin/#hook

Hi Matthew,

Thanks for reaching out.

Instead of doing that, please add this code to your child theme’s functions.php

add_action('x_after_body_begin', 'redolive_action' );

function redolive_action () {

do_action( 'after_opening_body' );

}

Their instructions are generic, but not all themes are created the same :slight_smile:

Thanks!

@Rad you beautiful creature. That is perfect, I’ll get it added. Any issues I’ll pop back on :slight_smile:

I added it Rad to the Pro Theme Function file, I wasn’t sure where to find the Child theme file so I assumed that would be it? I still get a message on the plugin saying that it isn’t detecting that bit of code. Found here, /home/parkinga/public_html/wp-content/themes/pro/functions.php.

I can see the header.php file below it, should I add it there too?

Hi Matthew,

Sorry, I forgot to add the URL about the child theme. Please check this https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

You should add the customization within the child theme, else, it will be overwritten by next update. And please make sure the child theme is active for it to work. And please don’t add it in header.php, it’s different than the one provided in their instructions.

Thanks!

Ah okay so I have to add a child theme myself then?

Hi Matthew,

Yes, you need to upload the child theme and activate it. Then you can add the code which @Rad has provided in the child theme’s functions.php.

Let us know how it goes.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.