• Resolved Babak

    (@babakprs)


    Hello,
    I have changed the search sludge of my site to /search/ and I would like to have them indexed by search engines.
    So I added the below to the function.php:

    add_filter( 'wpseo_robots', 'yoast_seo_robots_remove_search' );
    
    function yoast_seo_robots_remove_search( $robots ) {
      if ( is_search() ) {
        return false;
      } else {
        return $robots;
      }
    }

    But still I see <meta name=’robots’ content=’noindex, follow’> on search pages.
    Please, how can I change the meta to content=’index, follow’ for search pages?
    Thanks ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support devnihil

    (@devnihil)

    @babakprs Unfortunately we can’t offer support on custom code. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive for 7 days, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove No index from Search pages’ is closed to new replies.