• Resolved df7729

    (@df7729)


    I have a php page outside of wordpress that loads the header from wordpress to give the same visual look. Google is complaining that php pages breadcrumbs are bad because “Either “name” or “item.name” should be specified” and they give the example as: {"@type":"ListItem","position":2,"name":""}]. But really for this page it can have <meta name='robots' content='noindex, nofollow' />. I think it’s Yoast that is outputting <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' /> which is right above the comment that this site is optimized with Yoast SEO plugin v17.1. So in that page I tried adding the add action below the require_once(DIR_ROOT.'/wp-load.php');:

    add_action('wp_head', 'norobots', 0);
    function norobots() {
      echo ("<meta name='robots' content='noindex, nofollow' />");
    }

    But now it just ends up with two robot meta data items, the one above is first, followed by the one mentioned earlier:

    <meta name='robots' content='noindex, nofollow' /><meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' />

    How can I either fix the breadcrumb to work for those type of pages, or fix it for that given page (again, it’s not in word press), or turn it off for that page, or tell the search engines to not bother with this page?

    Thanks!

    • This topic was modified 3 years, 2 months ago by df7729. Reason: formatting
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Suwash

    (@suascat_wp)

    @df7729

    While we are not quite familiar with your setup, could you please temporarily disable the Yoast SEO plugin to check whether the meta information has been added by our plugin or been hard-coded. Please bear in mind Yoast SEO would not output the meta information on the page located outside of WordPress.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    This thread has been marked as resolved due to a lack of activity.

    You’re always welcome to re-open this topic. Please read this post before opening a new request.

    Thanks for understanding!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prevent robots on page outside of wordpress?’ is closed to new replies.