0

I would like to insert these metatags, in all the internal pages of the site, less in the homepage

I wanted to inform google to only index my homepage, I wanted to insert this conditional in the head.php of my genesis installation.

<meta name = "googlebot" content = "noindex, noarchive, follow" />

I tested this code below but it did not work

if ( is_home() ) {

} else {
    <meta name="googlebot" content="noindex,noarchive,follow"/>
}
0

You will have to use this code.

<?php !is_home() : ?>
    <meta name="googlebot" content="noindex,noarchive,follow"/>
<?php endif; ?>

Keep in mind you are using php and you want to put some HTML within. You cannot simply write down everything like that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.