- This topic has 6 replies, 2 voices, and was last updated 2 years, 12 months ago by
Leo.
-
AuthorPosts
-
March 19, 2023 at 9:23 am #2573175
Paul
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.
<script id=”popup-rating-widget-script” src=”https://widget.reviewability.com/js/popupWidget.min.js” data-gfspw=”https://app.gatherup.com/popup-pixel/get/812a1b61aa82b57ce2db4a2864e77d866fb0022a” async></script>How should I do this? In Genesis, the Customizer allowed me to change theme settings for header and footer scripts.
March 19, 2023 at 10:39 am #2573232Paul
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.
March 19, 2023 at 11:04 am #2573249Leo
StaffCustomer SupportHi 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 🙂
March 19, 2023 at 11:42 am #2573295Paul
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,
PaulMarch 19, 2023 at 11:53 am #2573306Leo
StaffCustomer SupportThis article explains the message if you are interested:
https://docs.generatepress.com/article/disallow-php-execution/March 19, 2023 at 12:23 pm #2573319Paul
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,
PaulMarch 19, 2023 at 12:39 pm #2573330Leo
StaffCustomer SupportNo 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.
-
AuthorPosts
- You must be logged in to reply to this topic.