[Support request] Copy & paste a code into my website before the closing tag.

Home Forums Support Copy & paste a code into my website before the closing tag.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1479734
    Denis

    I need to copy a code in the Theme header (header.php) before the closing </body> tag in order to set up Web Push Notifications for my AWeber account.

    However, it seems that there isn’t a closing </body> tag in the header.php file and therefore I cannot verify the code with Aweber.

    I have checked with my hosting provider and they have referred me here, to the theme provider.

    Can I just add this tag at the end of the file or is there something else I should do?

    Thanks

    #1479866
    David
    Staff
    Customer Support

    Hi there,

    closing body tags are outside of the header.php

    There are there main WP hooks for adding codes:

    1. wp_head – in the header: <head></head> tags
    2. wp_body_open – immediately after the opening <body> tag
    3. wp_footer – before the closing </body> tag

    You can use the Hook element to add your codes to these hooks:

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

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