• Resolved belov222105

    (@belov222105)


    My friend
    I need to hide some custom post type from Google

    https://take.ms/AsNI4

    I have a lot custom posty type

    Now, after i swith on – noindex – i have – <meta name=’robots’ content=’noindex, follow’ />

    But i Need <meta name=’robots’ content=’noindex, NoFollow’ />

    Many day i try to found answer(((

    Need you help how can i change this

    I try width and code

    add_filter('wpseo_robots', 'yoast_no_home_noindex_procut_shablnu', 999);
    function yoast_no_home_noindex_procut_shablnu($string= "") {
    	
    	
    if ( is_search() ) {
            $string= "index, follow";
    } else {
            $string= "noindex, nofollow";
    }
    return $string;
    }

    but it now work

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter belov222105

    (@belov222105)

    My friend
    I need you help!

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @belov222105

    If you have a ‘noindex’ meta robots tag, that should actually be enough already for it not to appear in the search results. If you have a ‘nofollow’ tag, that means that Google won’t follow the links on that page.

    If you can edit that post/page/product, you can go to the advanced tab of the Yoast SEO meta box and set the option of ‘should search engines follow links on this post’ to ‘no’ and save the changes, and it should add the ‘nofollow’ tag accordingly.

    Thread Starter belov222105

    (@belov222105)

    i need to do it in bulk with hooks
    when the robot follows the links, it crawls the site and adds pages with a ban on indexing to its database

    but does not add it to the index

    because of this, the server has additional loads and garbage pages

    is it possible to somehow make a code that will add noFollow?

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    If you want to modify it in bulk, you might have to look at our Metadata API to manipulate the meta robots tag to add the ‘nofollow’ tag – https://developer.yoast.com/customization/apis/metadata-api/

    Plugin Support Maybellyne

    (@maybellyne)

    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 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Noindex and NoFollow’ is closed to new replies.