# Show Beaver Builder Rows Only to Logged-In or Logged-Out Visitors

> Hides any Beaver Builder row, column or module with the class "wpide-logged-in" from guests, and anything with "wpide-logged-out" from members.

- Type: PHP
- Runs: Frontend only
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: beaver-builder, visibility, members
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/beaver-builder-visibility-login-classes/

## Code

```php
add_filter( 'fl_builder_is_node_visible', function ( $is_visible, $node ) {
    if ( ! $is_visible || ! is_object( $node ) || empty( $node->settings->class ) ) {
        return $is_visible;
    }

    if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() ) {
        return $is_visible;
    }

    $classes = ' ' . $node->settings->class . ' ';

    if ( false !== strpos( $classes, ' wpide-logged-in ' ) && ! is_user_logged_in() ) {
        return false;
    }

    if ( false !== strpos( $classes, ' wpide-logged-out ' ) && is_user_logged_in() ) {
        return false;
    }

    return $is_visible;
}, 10, 2 );
```

## Notes

Add the class under Advanced > HTML Element > Class. Everything stays visible while the builder is open.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Show Beaver Builder Rows Only to Logged-In or Logged-Out Visitors" 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/
