# MemberPress: Add a Custom Tab to the Account Page

> Adds a new tab, such as "Resources" or "Support", to the MemberPress account page navigation with your own content.

- Type: PHP
- Runs: Run everywhere
- Category: [Memberships](https://wpide.com/library/category/memberships/)
- Requires: MemberPress
- Tags: memberpress, account, navigation
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/memberpress-account-custom-tab/

## Code

```php
if ( ! class_exists( 'MeprUser' ) ) {
    return;
}

$wpide_mepr_tab_slug    = 'resources';
$wpide_mepr_tab_label   = 'Resources';
$wpide_mepr_tab_content = '<h2>Member resources</h2><p>Download the latest guides and templates here.</p>';

add_action( 'mepr-account-nav', function () use ( $wpide_mepr_tab_slug, $wpide_mepr_tab_label ) {
    $active = isset( $_GET['action'] ) && $wpide_mepr_tab_slug === sanitize_key( $_GET['action'] );

    printf(
        '<span class="mepr-nav-item wpide-mepr-%1$s%2$s"><a href="%3$s"%4$s>%5$s</a></span>',
        esc_attr( $wpide_mepr_tab_slug ),
        $active ? ' mepr-active-nav-tab' : '',
        esc_url( add_query_arg( 'action', $wpide_mepr_tab_slug ) ),
        $active ? ' aria-current="page"' : '',
        esc_html( $wpide_mepr_tab_label )
    );
} );

add_action( 'mepr-account-nav-content', function ( $action ) use ( $wpide_mepr_tab_slug, $wpide_mepr_tab_content ) {
    if ( $wpide_mepr_tab_slug === $action ) {
        echo '<div class="wpide-mepr-tab">' . wp_kses_post( do_shortcode( $wpide_mepr_tab_content ) ) . '</div>';
    }
} );
```

## Notes

Put your content in $wpide_mepr_tab_content; shortcodes are allowed.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "MemberPress: Add a Custom Tab to the Account Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
