Hi @mihaylovra
Are the Buddypress profile pages editable in the WP backend? If so, it should show up as a content type that you can configure the default title and meta description template – https://yoast.com/help/how-to-modify-default-snippet-templates-in-yoast-seo/
You can view the available snippet variables that you can use here – https://yoast.com/help/list-available-snippet-variables-yoast-seo/
You can also choose to edit a page specifically and then set the SEO title and meta description in the Yoast SEO meta box.
Hi @mikes41720
There are no such settings anywhere. For some reason the plugin doesn’t work with baddypress. What can be done?
Hi @mihaylovra
If the content type isn’t editable in the backend, you can’t really access the Yoast SEO meta box and edit those fields or settings. Perhaps you can take a look at our metadata API and see if you can use these filters to output the meta tags for those BuddyPress profiles – https://developer.yoast.com/customization/apis/metadata-api/
It turned out to make a profile title as well:
/**
* Filters wpseo meta title.
*
* @param string $title title.
*
* @return string
*/
function bpdev_bp_items_title( $title ) {
if ( bp_is_blog_page() || bp_is_directory() ) {
return $title;
}
if ( bp_is_user() ) {
$title = sprintf( ' %s @%s looking for dating in %s ', bp_get_displayed_user_fullname(), bp_get_displayed_user_username(), bp_get_member_profile_data('field=City') );
}
return $title;
}
add_filter( 'wpseo_title', 'bpdev_bp_items_title' );
Thanks for the help!
Hi,
We’re glad to hear you were able to use the filters to get the expected output!
We’ll be closing this thread in order to keep the forum overview.
Thanks.