Viewing 4 replies - 16 through 19 (of 19 total)
  • shedda,

    It looks like Woocommerce is doing something here to make a page appear as an archive page within WordPress; the new robots meta feature is for single pages, not archive pages, so that’s why it’s not working here.

    Thread Starter shedda

    (@shedda)

    Hi again Peter,

    Thanks for all the help. How would you solve the problem?

    I am trying to put a line in the header.php that looks like this;

    <!-- IF Site is SHOP NOindex, Follow -->
    <?php if (is_page('shop'));
    echo '<meta robots="noindex, follow">';
    ?>

    But it dosent seems to work.

    shedda,

    Yes, that won’t work, because it’s showing up as an archive page; if it was showing up as a singular page, as you might expect it would, then All in One SEO Pack would already be doing this for you. See if this works:

    <!-- IF Site is SHOP NOindex, Follow -->
    <?php
    if ( function_exists( 'is_shop' ) && is_shop() )
            echo '<meta robots="noindex, follow">';
    ?>
    Thread Starter shedda

    (@shedda)

    Works just fine! Thanks alot for your help

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Meta noindex nofollow not working’ is closed to new replies.