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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -