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

ah, I understand, sorry not really into SEO

try this

add_filter( 'wpseo_metatitle', 'rew_meta_title' );
function rew_meta_title( $title ) {
    global $post;
    if ($post->post_type == 'reply' ) {
		$order = $post->menu_order ;
		$post_parent = $post->post_parent ;
		$topic_title = get_the_title ($post_parent) ;
        $title = $topic_title.' '.$order ;
    }
 return $title;
}
Skip to toolbar