Archived topic
Installing GatherUp Popup Code
6 replies · Started by Paul on March 19, 2023
I changed from a Genesis theme to Generatepress a couple of weeks ago and noticed that the GatherUp.com review popup is not working anymore. Genesis made it easy to add code to just ahead of or below the body tag. I'm trying to do the same thing with Generatepress.
I tried to add the code using the Code Snippets plugin and that broke the site. I installed the most recent backup so the site is working again.
Here's the code.
How should I do this? In Genesis, the Customizer allowed me to change theme settings for header and footer scripts.
I watched a WP Beginner YouTube video about adding code to the header and footer. It recommended the WP Code plugin. I installed it, used it to add the GatherUp code and it worked.
I also noticed that the Google Universal Analytics code had been removed during the theme change from Genesis to GeneratePress. So I also used the WP Code plugin to reinstall that code.
Hi Paul,
I believe the hook element would be what you need if you don't want to use an extra plugin or modify the theme code.
More info here:
https://docs.generatepress.com/article/hooks-element-overview/
https://docs.generatepress.com/article/wp-head/
https://docs.generatepress.com/article/wp_footer/
Let me know if this helps :)
Hey Leo,
The hook element doesn't work because I get this message.
Unable to execute PHP as DISALLOW_FILE_EDIT is defined.
I had no problems inserting the code with the WP Code plugin, so the hook element doesn't seem to be the best solution.
I appreciate the suggestion though,
Paul
This article explains the message if you are interested:
https://docs.generatepress.com/article/disallow-php-execution/
Hi Leo,
I understand the message, and it was probably added by the Wordfence plugin on that site. But none of the solutions you've suggested would seem to work as well and as easily as the WP Code plugin.
If I'm missing something, let me know.
Thanks,
Paul
No problem :)
Feel free to use the plugin.
My replies were simply providing the information that this is doable using a hook element in GP that's all.