Site logo

Archived topic

Sudden error to my website after updating my Generatepress to the latest version

3 replies · Started by Russell on March 22, 2023

Viewing posts 1–4 of 4

I just noticed that after I updated my generate press, my Google analytics and Taboola ads were not working anymore.

My analytics was placed in my header while my Taboola ad code was placed before the </body> tag.

I tried several ways to fix it, like re-adding the code to my analytics code to head.php and taboola code before </body>

However, my attempts fail and didn't solve the problem.

I reverted temporarily to my previous theme and now everything is working perfectly again.

I still like to use generatepress so I'm reporting it to you, hoping that you'll fix the problem.

Hi Russell,

To clarify, how are you adding the Ad codes when using the GP theme?

Hello Fernando,

I put my analytics code and Taboola code to header.php via Theme file editor.

I also put another Taboola code before </body> by using Ad Inserter Pro.

After I updated it to the latest version, all my ads via Ad Inserter Pro was working normally except to the Taboola ads.

Now I decided to restore my website so I could revert the version of my Generate Press to version 3.2.4

After the restoration, I realized that the codes I added to header.php was gone after I updated it to the latest version and if I try to add it again, it doesn't work anymore.

I'm currently using 3.2.4 and it work normally again.

I see.

Are you using a Child Theme?

If you added those codes on the Parent theme, they would always be removed upon updating.

We recommend just adding them through a Hook Element. Reference: https://docs.generatepress.com/article/hooks-element-overview/

There are wp_head and wp_body_open hooks you can use to add the codes in the proper locations.

This archived topic is closed to new replies.