Site logo

[Resolved] Adding a Javascript script

Home Forums Support [Resolved] Adding a Javascript script

Home Forums Support Adding a Javascript script

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2497708
    vasu

    Hi!

    Can I add a Javascript script to Code Snippets and will it work if I do? It’s a script I have to install globally in the header. Thanks!

    #2497775
    David
    Staff
    Customer Support

    Hi there,

    you can use a GP Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    1. Go to Appearance > GeneratePress and activate the Elements module.
    2. Go to Appearance > Elements -> Add New –> Hook Element.
    3. Add your <script> in the text area
    4. Set the Hook to wp_head
    5. Set the Display Rules -> Location to Entire Site

    #2502281
    vasu

    Thank you!

    #2502627
    David
    Staff
    Customer Support

    You’re welcome

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