Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • naplpm
    Participant

    @naplpm

    Hello,


    @drill_sgtlewis
    , can you tell me how can I adapt this code to avoid non-logged user to get to a specific page?

    I was trying something like this:

    function restrict_access(){
    global $bp, $bp_unfiltered_uri;
    $component = $bp->current_component;

    if (!is_user_logged_in() && ($component == “events”)
    ) {

    bp_core_redirect( “/home/” );

    }
    }

    add_action( ‘wp’, ‘restrict_access’, 3 );

    But it didn’t worked.

    Thanks

Viewing 1 replies (of 1 total)
Skip to toolbar