Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide ‘Members’ page from all except Admin

Viewing 4 replies - 1 through 4 (of 4 total)

  • @mcuk
    Participant

    @mcuk

    Would a redirect do? –

    //Prevents non admin users seeing pages 
    function bptest_restrict_bp_pages() {
    	global $bp;
    	
    	if( !is_super_admin() && bp_is_members_directory() ) {
    		bp_core_redirect( $bp->root_domain );
    	}	
    }
    add_action( 'get_header', 'bptest_restrict_bp_pages' );

    sincewelastspoke
    Participant

    @sincewelastspoke

    Absolutely fantastic, mcUK – many, many thanks 🙂


    @mcuk
    Participant

    @mcuk

    🙂


    Ron Ashman
    Participant

    @fakurkr

    mcUK thank you!! 😀

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar