The MemberPress Account page (/account/) serves as the central dashboard where subscribers manage their profile, active subscriptions, and payment methods. However, when building custom client portals, membership communities, or specialized directories, you often need to introduce a brand-new custom tab—such as a user-specific project list, custom download hub, or extra settings panel.
Instead of hacking template files or building a separate frontend routing system, you can easily add custom tabs and render custom content using native MemberPress hooks.
In this tutorial, we will walk through how to add a custom tab to the MemberPress account dashboard.
1. Adding a Custom Tab to the Account Navigation
To introduce a new tab into the account navigation menu, we hook into the mepr-account-nav filter.
Add the following code to your custom plugin or theme’s functions.php:
if (!defined('ABSPATH')) {
exit;
}
add_filter('mepr-account-nav', 'wg_mepr_add_custom_account_tab');
function wg_mepr_add_custom_account_tab($nav_items) {
// Insert a new tab named 'My Projects'
$nav_items['wg-projects'] = [
'label' => __('My Projects', 'webgarage'),
'uri' => 'wg-projects', // Slug for the endpoint
];
return $nav_items;
}
2. Rendering Content for Your Custom Tab
Once the navigation item is registered, MemberPress listens to the endpoint slug (?action=wg-projects or pretty permalinks). To render custom HTML content when this tab is active, we hook into mepr-account-row.
add_action('mepr-account-row', 'wg_mepr_render_custom_account_tab_content');
function wg_mepr_render_custom_account_tab_content($action) {
// Check if our custom action matches the current URL endpoint
if ($action === 'wg-projects') {
$current_user = wp_get_current_user();
?>
Website Redesign
3. Securing Access to Your Custom Tab
By default, the MemberPress account page requires users to be logged in. However, if your custom tab fetches sensitive user data or executes database queries, always verify user capabilities and sanitize output inside your content renderer.
// Ensure the user is logged in before rendering anything sensitive
if (!is_user_logged_in()) {
return;
}
Extending the MemberPress account dashboard with custom tabs allows you to build deeply integrated client portals and membership dashboards without altering core plugin templates.
Be sure to check out our previous tutorials on WordPress development:
How to Modify MemberPress Product Prices Dynamically
How to Handle MemberPress Events & Webhooks in PHP
How to Check MemberPress Subscriptions & Redirect Users
Need help with your project? We will be happy to help with your project. Feel free to contact us. Just reach out and we will reply soon.