• Resolved reedy

    (@reedy)


    Is it possible to exclude bbpress user profile pages from being indexed?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Yes, that’s possible.

    This should do (untested!):

    add_filter( 'the_seo_framework_robots_meta_array', function( $meta, $args ) {
    
    	// Test if in the loop
    	if ( null === $args ) {
    		if ( function_exists( 'bbp_is_single_user' ) && bbp_is_single_user() ) {
    			$meta['noindex'] = 'noindex';
    		}
    	}
    
    	return $meta;
    }, 10, 2 );

    (Where do I place filters?)

    Have a nice day!

Viewing 1 replies (of 1 total)

The topic ‘Exclude bbpress user pages?’ is closed to new replies.