This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Add code below opening <body> tag

  • Creator
  • #7451


    I’ve just set up Google Tag manager and need the code to be inserted just below the opening <body> tag.

    There are a couple of plugins that can insert the code, but they seem to put it very low on the site. It should go just below the tag.

    Is there anyway I can do this?

    I have Swager set up as a ‘Child theme’, but I don’t know anything about web hooks etc, so if that’s the answer, please help me through it. I just know I have some code that I need to put in place.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #7454
    Jason Bobich

    Hello Damian,

    This will be a customization you’ll need to make to the theme, and so it make take some learning on your part to make this happen. Yes, I would agree the best answer would be to probably utilize action hooks from your Child theme’s functions.php.

    Here’s a video on how Child theme’s work. It’ll explain what it is and introduce you to where you should be putting action hooks.

    Here’s an overview of what action hooks are:

    And here is a listing of the theme’s action hooks you can utilize:

    The “themeblvd_before” hook will sit just below the opening <body> tag. For example —

    function my_add_code(){
    	your add code ...
    add_action('themeblvd_before', 'my_add_code');

    Thanks Jason,

    I wasn’t exactly sure what I was doing, but just went for it and it seems to have worked 🙂


Viewing 2 replies - 1 through 2 (of 2 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.