php - Wordpress- How to insert code to header for a specific page only? -
i use wordpress , add 2 lines of code header of 1 page only.
the problem header.php change site's headers , want change header of 1 specific page.
the thing want add 1 line :
<meta name="robots" content="noindex, nofollow"/>
you have add pageid on header file
global $post; if($post->post_type == 'page' && $post->id == 'whatever page id'){ echo '<meta name="robots" content="noindex, nofollow" />'; }
it display meta on specific page want.
suppose have add pageid == '5' display meta tag in page id = '5'.
Comments
Post a Comment