BP_RankMath_Title::title()

Retrieves the SEO title.

Description

Return

(string)

Source

File: bp-core/compatibility/bp-rankmath-plugin-helpers.php

25
26
27
28
29
30
31
32
33
34
35
36
public function title() {
    if ( bp_is_user() ) {
        $title = get_user_meta( bp_displayed_user_id(), 'first_name', true );
        if ( empty( $title )) {
            $title = get_user_meta( bp_displayed_user_id(), 'nickname', true );
        }
    } else {
        $title = isset( buddypress()->groups->current_group->name ) ? buddypress()->groups->current_group->name : __( 'Social Group', 'buddyboss' );
    }
 
    return $title . ' - ' . bp_get_site_name();
}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.