[Support request] wp_head versus before header location in hooks element

Home Forums Support [Support request] wp_head versus before header location in hooks element

Home Forums Support wp_head versus before header location in hooks element

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #791718
    George

    1. Could you please tell me what the difference is between these two locations in the hooks element section:
    ‘wp_head’ – and ‘before header content’.
    header location for hooks

    2. The first block of the google tag manager code is supposed to go into the ‘wp_head’ section, and the second block into the ‘before header’ section. However I saw in google tag manager that this second block is supposed to go right after the opening <body> tag. So now I am not clear what exactly the best placement for it is.

    3. Is the ‘wp_head’ the same as the ‘header’, or is this a different thing?

    #791865
    David
    Staff
    Customer Support

    Hi there,

    WP_Head and Header are two different things.
    WP_Head is the real important <head> area of your website. Used for adding meta and links for scripts etc. It should never be used for displaying content.

    before_header is a GeneatePress Hook and appears immediately after the opening <body> tag.

    So for Google tag manger, the first code goes in wp_header and the second code in before_header

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