Hello Summer Sale!
Exclusive season-opening discount on TheGem theme.
Limited time offer.

Okay
  Public Ticket #3136606
want to add noindex to individual pages
Closed

Comments

  • lkmweb started the conversation

    I do not want to discourage google from indexing the site, just specific pages. Other than making them private/password protected, is there a way to protect the content page-by-page?

  •  7,280
    Oliver replied

    HI,

    You can use any SEO plugin to make it, like Yoast seo or Rank Math 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  7,280
    Oliver replied

    Or add this code to the fucntions.php of the child theme:

    add_action( 'wp_head', function() {
       global $post;
       if ($post->ID == 1111) {
            echo '<meta name="robots" content="noindex, nofollow">';
        }
    } );
    

    Where 1111 - page id

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • lkmweb replied

    Thank you for these solutions Oliver. Much appreciated.

  •  7,280
    Oliver replied

    You're welcome!

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver