Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1203124

    How can I set no index to all entries in portfolio instead of going one by one with RankMath?

    Thanks.

    #1203180

    Hey peterolle,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

      function add_custom_meta(){
    	if (is_singular('portfolio')){
    	?>
    	<meta name='bingbot' content='NOODP NOARCHIVE, NOINDEX'>
        <meta name='ROBOTS' content='NOINDEX, NOARCHIVE, NOODP, NOYDIR'>
        <meta name='GOOGLEBOT' content='NOINDEX, NOARCHIVE, NOODP'>
    	<?php
    	} else {}
    }
      add_action('wp_head', 'add_custom_meta', 1);

    Best regards,
    Mike

    #1212681

    I just check and they still appear.

    How can I remove completely portfolio items from Google?

    Thanks.

    #1212919

    Hi,
    If the code is working correctly and you can see the code in your header, then ask Google to recrawl your site.

    Best regards,
    Mike

    #1213202

    Thank you.

    The code appears in header when I see a portfolio item, however it is still appearing in google results.

    Index Coverage – Last updated: 5/12/20

    It appears exactly as this:

    
    <meta name="bingbot" content="NOODP NOARCHIVE, NOINDEX">
    <meta name="ROBOTS" content="NOINDEX, NOARCHIVE, NOODP, NOYDIR">
    <meta name="GOOGLEBOT" content="NOINDEX, NOARCHIVE, NOODP">
    

    I removed this and tried Rank Math global option. Will wait to see the results.

    Thanks.

    • This reply was modified 4 years, 4 months ago by peterolle.
    #1213239

    Hi,
    Thanks for the update.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.