adding various stuff in head

  • ronangelo

    #4762

    Hi Syahir,

    I was wondering if you could add an option where we can add codes/data in the <head>. I know there is already an option for adding “google analytics” but it does not accept other codes. I think it’s a good idea to either allow other tracking codes and data to be accepted in the analytics option or to create a new option dedicated for various codes/tracking/meta that are added in the <head>.

    example. google verification, google fonts.

    Currently, I have to modify the header.php in my child theme to add these. And updating a theme means copying the new header to the child theme and adding the data again.

    Thanks,

    Ron

    Mod

    Kenneth John Odle

    #29113

    I have to modify the header.php in my child theme to add these.

    No, you don’t. Use a child theme and add any codes you need in the <head> area to the wp_head() action hook.

    ronangelo

    #29114

    Thanks for pointing that out. A few searches and I learned something new. I just watched the action hook video by Josh Lobe.

    Admin

    Syahir Hakim

    #29115
    Quote:
    I know there is already an option for adding “google analytics” but it does not accept other codes.

    You should be able to add other codes inside the Google Analytics code option. It’s not its intended use, but you should be able to.

    Admin

    Syahir Hakim

    #29116

    Just to mirror my message on the this thread: I will add an option to to add custom tags into the theme’s <head> element in version 1.8.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.