Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: bbPress and Yoast SEO conflict – How to change the meta title for the replies?

@robin-w

Moderator

thanks – I’m just a user who helps out here, not a bbpress author.

so

1. can you confirm that the above plugin is not necessary – bbpress already does this ?

2.

can you try this code

add_filter( 'wpseo_metadesc', 'rew_meta_desc' );
function rew_meta_desc( $content ) {
    global $post;
    if ($post->post_type == 'reply' ) {
		$order = $post->menu_order ;
		$post_parent = $post->post_parent ;
		$title = get_the_title ($post_parent) ;
        $content = $title.' '.$order ;
    }
 return $content;
}

Put this in your child theme’s function file – or use

Code Snippets

Skip to toolbar