# Paid Memberships Pro: Hide Levels From the Levels Page

> Keeps chosen levels (for example a hidden staff or legacy level) off the public levels page while their checkout links keep working.

- Type: PHP
- Runs: Run everywhere
- Category: [Memberships](https://wpide.com/library/category/memberships/)
- Tags: pmpro, levels, pricing
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/pmpro-hide-levels-from-levels-page/

## Code

```php
if ( ! function_exists( 'pmpro_getAllLevels' ) ) {
    return;
}

// Level IDs to hide.
$wpide_pmpro_hidden_levels = array( 4 );

add_filter( 'pmpro_levels_array', function ( $levels ) use ( $wpide_pmpro_hidden_levels ) {
    foreach ( $levels as $key => $level ) {
        if ( in_array( (int) ( is_object( $level ) ? $level->id : $key ), $wpide_pmpro_hidden_levels, true ) ) {
            unset( $levels[ $key ] );
        }
    }

    return $levels;
} );
```

## Notes

People can still join a hidden level if you give them its checkout link.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Paid Memberships Pro: Hide Levels From the Levels 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/
