[Support request] Can’t load javascript on single page with hook

Home Forums Support [Support request] Can’t load javascript on single page with hook

Home Forums Support Can’t load javascript on single page with hook

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
  • #1632332

    I have create a Hook but my javascript doesn’t work on single page.
    Could you please help me ?

    Customer Support

    Hi there,

    what is the Javascript you want to add ?


    Hello David,
    I have tried the “hook methode” but with no success.
    It’s from Vibrant Media (https://www.vibrantmedia.com) and it was working good with my previous WordPress Theme.
    My javascript is : <script type=”text/javascript” src=”//k.intellitxt.com/inteItllitxt/front.asp?ipid=XXXXX”></script>
    Thanks you for your help,

    Customer Support

    Looking at that script it should be added to the wp_head hook and make sure the Display Rules are set to Entire Site ( or the pages you want it to execute ).

    If you can do that and then link me to a page where the script should be, i can take a look to see if the hook is working.


    It’s done. I can see it with Ghostery for Google Chrome (Vibrant Ads) but the in-text advertising doesn’t display. Here a link to the page : https://www.jcbtechno.com/
    Thanks you

    Customer Support

    I just checked you site and i can see a banner advert above the content, and adverts in the sidebars on the home page.
    Also see a pop up ad when clicking a post link.
    And then in the content of a Single Post i can also see adverts being inserted.

    Maybe try clearing your browser caches ?


    Sorry David,
    But it is not the problem, My browser cache is cleared.
    I can not see my in-text ads (green color).
    If you can not help me, no problem. I’m going to ask refund and reinstall Schema wordpress theme.
    Thanks you,

    Customer Support

    So i found this guide here:


    So the scripts need to be fired after the content.
    Try using the wp_footer hook to do that.


    I already done this. It doesn’t work.
    It’s working with other wordpress them but not with GeneratePress, and i don’t understand why.

    Customer Support

    Which hook do you have the script in now ? And can you move it to the footer hook so i can take another look?


    Yes, wp-footer hook is already in place now.

    Customer Support

    Just to make sure, it’s only not working on the home page?

    If that’s the case, can you try disabling all plugins except GP Premium to test?

    Let me know 🙂


    Hello Leo,
    The problem is still here.
    You can have a look on my website https://www.macplanete.com/
    You will see it’s working very well with other WordPress theme like Schema (text link ads in green in single post).
    Thanks you for your help.

    Lead Developer
    Lead Developer

    The theme doesn’t really matter when it comes to hooks like this – the hook isn’t aware of the theme, it simply adds what you want it to add.

    As a test, let’s try some code that is completely separate from the theme – it would work with any theme you choose.

    add_action( 'wp_footer', function() {
            Code in here will be added to the wp_footer hook regardless of the theme you choose.
    } );

    GeneratePress itself doesn’t have the capability to prevent ads from being shown, so as long as the correct directions are being followed and the code is appearing in the source where it belongs, it should work.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.