When you’re building a community site with BuddyPress or BuddyBoss, the user’s profile page becomes a major hub for where they jump into community conversations and manage their account.

In the current release of PMPro’s BuddyPress and BuddyBoss integration Add On, we added a feature to extend the default profile with membership information by adding a new membership section.

In this tutorial, we show you how to use the pmpro_buddypress_profile_account_shortcode filter to adjust the default output of the membership tab based on your needs.

Banner Image for Code Recipe BuddyPress Membership Tab

About the Code Recipe

By default, the membership tab shown on the BuddyPress profile will include the complete output of the Membership Account page block or shortcode. This content will include the four main membership sections:

  • Membership
  • Invoices
  • Links
  • Profile

In this code recipe, we demonstrate how to use the pmpro_buddypress_profile_account_shortcode filter to allow you to customize which account page sections are shown. The code recipe below returns only the following sections:

  • Membership
  • Invoices
Screenshot of BuddyPress Membership Tab

You can customize this code to show or hide any of the four membership sections. 

The Code Recipe (PHP)

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

You can visit our documentation here to see the full information displayed on the membership account page: https://www.paidmembershipspro.com/documentation/frontend-pages/membership-account/ 

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo