This topic has 3 replies, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #93852
     i3ock
    Participant

    hello again 😀

    how can i hide the whole member profile for not registered people?

    #93920
     Radu
    Moderator

    Hi,

    Add this function to wp-content/themes/kleo-child/functions.php

    COPY CODE
    
    
    /* Prevent logged out users from accessing bp activity page */
    function nonreg_visitor_redirect() {
        global $bp;
        if ( bp_is_members_component() || bp_is_activity_component() || bp_is_groups_component() ) {
            if(!is_user_logged_in()) { //just a visitor and not logged in
                //wp_redirect( get_option('siteurl') . '/wp-login.php' );
                wp_redirect( home_url() . '/register/' );
            }
        }
    }
    add_filter('get_header','nonreg_visitor_redirect',1);
    
    

    Let me know

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #94046
     i3ock
    Participant

    thx again 🙂

    #94564
     Radu
    Moderator

    You’re welcome,

    Also don’t forget to rate our theme on Themeforest and give it 5 stars 🙂

    http://themeforest.net/downloads/

    Best regards

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?