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
  • #6000

    How do I add a code within the head tags of the html, specifically the main page?

    Thanks again for all your help,


Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #6018
    Jason Bobich

    Hello Florin,

    If you’re not trying to do anything completely custom and you’re just wanting to edit common things like SEO meta data or whatever, you should look at just using some sort of SEO plugin like Yoast SEO:

    Otherwise, you’d just output your content from some function and hook it to “wp_head” from your Child theme’s functions.php file.


    All I’m trying to do is add a 3rd party vacation rental search form on my website that requires to add a small code within the tags along with the code that would go between the tags. Also I don’t have the theme set up as a child theme either. Any suggestions? Thanks again.

    Jason Bobich

    Install the sample child theme included with the theme. Hook your content to wp_head from your Child theme’s functions.php. I’m honestly not really sure what other kind of answer you’re looking for on adding custom code to your <head>.

    function my_stuff(){
    	if( is_home() ) :
    	your stuff for the <head> ...
    add_action( 'wp_head', 'my_stuff' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.