# OceanWP: Hide the Top Bar on Selected Pages

> Hides OceanWP's top bar on the pages you list, such as checkout or landing pages, while keeping it on the rest of the site.

- Type: PHP
- Runs: Frontend only
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: oceanwp, top-bar, header
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/oceanwp-hide-top-bar-on-pages/

## Code

```php
// Pages without the top bar.
$wpide_ocean_no_topbar = array( 'checkout', 'landing' );

add_filter( 'ocean_display_top_bar', function ( $display ) use ( $wpide_ocean_no_topbar ) {
    return is_page( $wpide_ocean_no_topbar ) ? false : $display;
} );
```

## Notes

Use page IDs or slugs.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "OceanWP: Hide the Top Bar on Selected Pages" 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/
