Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Locking a website using bp-custom

Viewing 3 replies - 1 through 3 (of 3 total)
  • @hnla

    Participant

    well doubt it would be ‘get_page()’ try ‘is_page()’ with a name, slug, or id.

    @shanebp

    Moderator

    Or use the unfiltered_uri, for example…

    function restrict_access(){
     global $bp_unfiltered_uri;
    
     if ( !is_user_logged_in() && !bp_is_register_page() && !bp_is_activation_page() && ( $bp_unfiltered_uri[0] != 'some-slug') )
      bp_core_redirect( get_option('home') . '/register' );
    
    }
    add_action( 'wp', 'restrict_access', 3 );

    @icepin

    Participant

    both options working like a charm!
    you guys are awesome, herzlichen dank!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Locking a website using bp-custom’ is closed to new replies.
Skip to toolbar