Skip to:
Content
Pages
Categories
Search
Top
Bottom

Noindex tag

  • @andreaspaggiari1

    Participant

    Hi,

    How can I set a noindex tag on all buddypress pages, in order not to show them on google?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @dcavins

    Keymaster

    There’s a function to tell when you’re on a BP page is_buddypress() so this is a guess at how you could do it:

    add_action( 'wp_head', function() {
      if ( is_buddypress() ) {
        echo '<meta name="robots" content="noindex">';
      }
    });

    @originalo

    Participant

    I am also looking for a way to set a noindex tag on all buddypress member profile pages and addes the above code to my functions.php file, but it doesn’t work.
    Could you please advise where to place the code exactly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar