• Resolved rayorlana

    (@rayorlana)


    I am using Web Stories plugin and noticed that Yoast seems to add duplicate robots meta tag on web-story content type.

    Is it possible to remove the robots meta tag from yoast using wp actions?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello,

    Thanks for reaching out.

    Please provide us with screenshots that highlight the issue you are experiencing. You can use any image sharing service like https://pasteboard.co/, https://snag.gy/, https://imgur.com/, https://snipboard.io/, or even upload the screenshot to your own website. Once you upload it an image sharing service, please share the link to the image here.

    Thread Starter rayorlana

    (@rayorlana)

    Hi, here is the DOM on a web-story page with Yoast activated.
    https://pasteboard.co/K4SRmqb.png
    (image alt: Duplicate Meta Robots Tag)

    I think it is conflicting with Web Stories plugin on this part
    https://github.com/google/web-stories-wp/blob/main/includes/Discovery.php#L72-L76

    Not sure if this is supposed to be fixed on Web Stories or Yoast.
    Tested with another SEO plugin and it seems to work fine for Web Stories.

    Plugin Support Maybellyne

    (@maybellyne)

    We weren’t able to reproduce this on WordPress 5.7.2, Yoast SEO 16.4 and Web Stories 1.7.2. The meta robots for a specific web story and the web-story content type was checked and only one meta robot is outputted.

    However, you asked if it is possible to remove the robots meta tag from Yoast. You can do this by navigating to WordPress > SEO > Search Appearance > Content Types. For the option, Show Stories in search results?, choose ‘No’. We do not think this will provide the desired results.

    Often, we see problems occur in combination with another plugin or theme. The fastest way to rule out any conflict, is to deactivate all non-Yoast plugins and switch to a standard theme like Twenty Twenty.

    Please test this on your development or staging site, if you have one. If not, we recommend using the Health Check & Troubleshooting plugin. This plugin has a troubleshooting mode, which does not affect normal visitors to your site.

    If you’re unfamiliar with checking for conflicts, we’d like to point you to a step-by-step guide that will walk you through the process: How to check for plugin conflicts

    If you do not feel comfortable doing this yourself or if this does not solve your issue, our Yoast SEO Premium plugin comes with one year of (technical) support.`

    Thread Starter rayorlana

    (@rayorlana)

    Turns out it’s conflicting with my custom theme.

    Decided to add

    add_action( 'template_redirect', 'remove_robots_webstories' );
    
    function remove_robots_webstories() {
        if ( is_singular( 'web-story' ) && function_exists( '\wp_robots' ) ) {
    		remove_action( 'web_stories_story_head', 'wp_robots', 1 );
        }
    }

    on functions.php instead to remove the duplicate robots meta.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Yoast adds duplicate meta robots on Web Stories’ is closed to new replies.