WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[BUG] Really annoying robots meta missing (2 posts)

  1. DanFromGermany
    Member
    Posted 7 months ago #

    Problem:

    On normal posts and pages (with all kinds of configuration), the robots meta information is missing => new posts don't get indexed.

    Solution:

    /wp-content/plugins/wordpress-seo/frontend/class-frontend.php

    at the end of the function robots(), change

    if ( $robotsstr != '' ) {
                            echo '<meta name="robots" content="' . esc_attr( $robotsstr ) . '"/>' . "\n";
                    }

    to

    if ( $robotsstr != '' ) {
                            echo '<meta name="robots" content="' . esc_attr( $robotsstr ) . '"/>' . "\n";
                    } else {
                            echo '<meta name="robots" content="index,follow" />' . "\n";
                    }

    credits to http://blog.flowl.info/2013/fix-seo-plugin-show-meta-robots-indexfollow-wordpress/

    http://wordpress.org/plugins/wordpress-seo/

  2. jrf
    Member
    Posted 6 months ago #

    This is not a bug, but a feature.

    If the robots string ends up being index,follow, there is no need to add it to the page/post as that's the generic default for all robots.

Reply

You must log in to post.

About this Plugin

About this Topic