This topic has 3 replies, 2 voices, and was last updated 7 years by Kieran_SQ.

  • Author
  • #182532
     anonim_2m
    Participant

    is possible to make the home page can only be seen by unregistered users? like facebook, if I’m registered I see my profile and site content, if I’m not registered I see just frontpage with the registration form.

    Multumesc! 🙂

    #182552
     Kieran_SQ
    Moderator

    Hi,

    Thanks for contacting us about having a single page for logged out users, you can use the below snippet in your KLEO Child’s functions.php file to redirect all logged out users to a specific page.

    COPY CODE
    // Redirect to register if logged out and page is BuddyPress
    function kleo_page_template_redirect()
    {
        //if not logged in and on a bp page except registration or activation
        if( ! is_user_logged_in() &&
            ( ( ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) )
        )
        {
            wp_redirect( home_url( '/register/' ) );
            exit();
        }
    }
    add_action( 'template_redirect', 'kleo_page_template_redirect' );

    Change /register/ to your desired page, you should keep your home page set as it is in Settings > Reading

    Thanks,

    Kieran

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

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

    #182723
     anonim_2m
    Participant

    Multumesc mult!

    #182725
     Kieran_SQ
    Moderator

    Esti bine venit 🙂

    Feel free to open a new ticket any time with more questions and we’ll be happy to help.

    Thanks,

    Kieran

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

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.

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?