The following snippet will insert code into your WordPress sites home page header only. So for example if you want to display some schema on JUST your home page you could use this code.

Insert this into the WordPress theme’s functions.php file:

// Insert code into header on the homepage only
function homepage_header_only(){
if(is_front_page()) {  ?>
CODE TO ADD TO YOUR HEADER GOES HERE
<?php  }
};
add_action('wp_head', 'homepage_header_only');

Leave a Reply

Get in Touch

Please fill out the form below and we will get back to you ASAP

  • This field is for validation purposes and should be left unchanged.