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.

How to add code within the head tag

  • Creator
  • #7232

    I want to add some Google verification code to my theme header and not sure how to do it. I don’t have a child theme set up.


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


    1) If it’s just a temporary thing, you could always just put it in header.php of the theme, but I wouldn’t suggest altering any theme files and leaving them like that, as you’re going to have problems with updates in the future.

    2) You could set up a child theme and hook to wp_head from your Child theme’s functions.php as any plugin could.

    function my_stuff(){
    	your stuff for the <head> ...
    add_action( 'wp_head', 'my_stuff' );

    3) You could find a plugin that possibly helps with the specific task:

    4) You could find a plugin that just allows you to insert scripts into your site:

    5) I’m no expert on Google Analytics and webmaster tools, but maybe the trick is to insert your analytics with this plugin instead of using the theme’s option.


    That’s brilliant thanks, I will give it a try and let you know how I get on?

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