BUDDYBOSS WEB

Your community, courses and memberships on your own website.

BUDDYBOSS APP

Your own branded app on iOS and Android.

DONE FOR YOU

We build, launch and run it for you.

BuddyBoss website and mobile app

Web + App Done For You

$4,999 flat

Web Scale + Done For You Web

App Launch + Done For You App

PRICING

Web Pricing

Launch, Scale and Done For You Web.

From

$199

first year

App Pricing

Solo, Launch and Done For You App.

From

$499

first year

SITE + APP

Web + App Done For You

Your site and your app, built and run for you.

$4,999

flat, never rises

How to Add Custom Yoast SEO Meta Data for a Member’s Profile Page

Updated

Introduction

BuddyBoss does not provide a built-in option to customize Yoast SEO meta descriptions for individual member profile pages. However, you can use a small custom function to dynamically generate meta descriptions from a member’s profile fields (e.g., Bio field). This guide explains how to add custom Yoast SEO meta data for a member’s profile page.

Custom Workaround

Before proceeding, make sure you have a complete site backup.

  1. Add a new profile field named Bio in your BuddyBoss member profiles.
    Learn how here: Profile Fields Documentation
  2. Go to Appearance > Theme Editor in your WordPress admin dashboard.
  3. Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
  4. From the Theme Files list, open Theme Functions (functions.php).
  5. Add the following code just before the closing PHP tag (?>):
<?php

// Create the members page's meta description using the Bio profile field

add_filter( 'wpseo_metadesc', 'bb_custom_metadata_member_page' );

function bb_custom_metadata_member_page( $desc ) {

    // Exclude blog pages and directories

    if ( bp_is_blog_page() || bp_is_directory() ) {

        return $desc;

    }

    // Only modify for user profile pages

    if ( bp_is_user() ) {

        $args = array(

            'field' => 'Bio', // Name of the profile field

        );

        $bio = bp_get_profile_field_data( $args );

        if ( empty( $bio ) ) {

            $bio = "Some default description. Please fill your Bio in Profiles → Edit → Bio.";

        }

        // Format meta description: "John Doe - Bio text"

        $desc = sprintf( '%s - %s', bp_get_displayed_user_fullname(), $bio );

    }

    return $desc;

}

?>

Note: You can use the bp_get_profile_field_data function to pull data from any profile field. In this example, we used the Bio field.

  1. Click Update File to save the changes.

Note: Modifications are typically considered custom work, but we are making an exception in this case. Please review the BuddyBoss Support Policy.

Troubleshooting and FAQs

Q: The meta description is not updating on member pages.
A: Ensure the code is added to your child theme’s functions.php file. Also, clear any caching or SEO plugin caches.

Q: Can I use other profile fields instead of Bio?
A: Yes. Replace ‘Bio’ in the $args array with the name of any custom profile field.

Q: Will this affect other pages?
A: No. This only modifies meta descriptions on individual member profile pages.

Q: Can I revert this change easily?
A: Yes. Remove or comment out the code from functions.php and save the file.

Was this article helpful?

Subscribe to Our Newsletter

This field is for validation purposes and should be left unchanged.
This field is hidden when viewing the form

Can’t find the answer you’re looking for?

Our support team is here to help with anything the docs don’t cover.