Archived topic
Script problem - Using Hook generate_before_header
1 reply · Started by Alejandro on May 27, 2022
Hi guys,
I've inserted 4 scripts that should be placed the first thing in the <body> to display ads (only in posts, so in the display rules I set it accordingly).
So far:
1) the scripts are not placed in the first place. why?
2) 2 of them are intended to be used for desktop view and the other 2 for mobile view. I see ads on the desktop view, not on the mobile view. Is there anything related to Generatepress that I should be aware to this extent?
Regards,
Alex
Hi there,
1) the scripts are not placed in the first place. why?
I'm not seeing the code on your site. If you want the code to appear first thing in body, then usewp_body_open hook instead.
2) 2 of them are intended to be used for desktop view and the other 2 for mobile view. I see ads on the desktop view, not on the mobile view. Is there anything related to Generatepress that I should be aware to this extent?
Just by looking at this code, I have no idea how the code works, so I can't tell you if it's related to GP. Are you using the code with a plugin? What's the exact instruction from the code provider?