[Resolved] Adding this code

Home Forums Support [Resolved] Adding this code

Home Forums Support Adding this code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1232387
    Manuel

    Hi all,
    thanks again for your awesome GP and GPP 🙂

    I’m not very familiar with coding so here’s my question:
    How can I add this code /function:

    lax.addPreset("myCoolPreset", function() {
    	return (
    		"data-lax-opacity": "(-vh*0.8) 40, (-vh*0.6) 0",
    		"data-lax-rotate": "(-vh*2) 1000, (-vh*0.5) 0" 
    	)
    })

    Tried it with the Code Snippet Plugin but didn’t work.

    Thanks a lot in advance!

    #1232464
    David
    Staff
    Customer Support

    Hi there,

    I assume its some Javascript ? If so try this:

    1. Create a new Hook element.

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

    2. Add your code to the element wrapped like so:

    <script type="text/javascript">
    /* Your code here*/
    </script>

    3. Select the WP_Footer hook.
    4. Set the Display Locations to entire site or wherever you need it.

    #1232485
    Manuel

    Oh, too easy.
    Thanks a lot David

    #1232502
    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.