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

  • Author
  • #102846
     lorndal
    Participant

    Hi,

    I´v set the Site “get connected” as Frontpage, but even people, who are not logged in or registerd, can see the menue/activities, etc..

    I would like to make it happen, that the mainmenue and the topbar and also the whole content is only visible for users, who are logged in.

    Even with the plugin “BP Registration Options” people can see the menues and the content.

    When I select “hide header” in the page-settings of Site “get connected”, even the “login-Button” dissapears.

    What´s the best way, to show people first a typical login-area with the option/link to register and after that, they get linked to the content?

    Or do I need a special plugin, to realize that?

    I really miss a detailed instruction for that and hope, to get help here 🙂

    nice greetings, Sandra

    #102943
     Radu
    Moderator

    Hi,

    If you need to restrict entire website for logged in users you can use the next function

    COPY CODE
    
    function allow_only_loggedin_users () {
    
        if(!is_user_logged_in() && !is_page('register') && !is_page('login')) {
            wp_redirect(home_url('register') , 301);
            exit;
        }
        
    }
    add_action('template_redirect', 'allow_only_loggedin_users', 99);
    

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

    If an user access your domain it will redirected to the registration form.

    Cheers

    RAdu

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

    Well, thanks, this works fine with the redirect to the register-page.
    But how can I make it happen, that the Login-Template pops-up as when you click on the “login-Button”?
    Or how can I integrate exactly this pop-up-login-form into a login-page, instead of the register-page?

    I just want to make a cool login/register Startpage!
    Thanks!
    Sandra

    #105064
     Radu
    Moderator

    Hi,

    Today or tomorrow a new version of kleo will be released and you will be allow to generate a login form or register form with shortcode

    COPY CODE
    
    [kleo_login show="login|lostpass" login_title="Log in with your credentials" lostpass_title="Forgot your details?" login_link="#|url" lostpass_link="#|url" register_url="hide|url"]
    

    Also this feature will be present as visual element in visual composer after you will update your Theme, K-elements and Visual composer.

    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
    #106187
     lorndal
    Participant

    Hi Radu,
    thanks, everything is updated and I´ve created a page called “login”.
    This is now my frontpage, with the “Kleo LOGIN Form”, as I wanted it.
    But where can I manage the redirect, after login?

    At the moment, the logged in user keeps staying on this login-page, which is empty now, of course!

    In the Kleo Login Settings of this visual-composer-form there is an option for the “login link” but when I replace the # with localhost/myside/get-connected/
    nothing happens!

    Thanks a lot,
    Sandra

    #106251
     Radu
    Moderator

    Hi,

    Go to wp-admin -> theme options -> miscellaneous -> Login redirect for Popup* -> choose custom link

    Let me know if is ok

    Cheers

    Radu

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

    perfect, it works out. Thanks a lot!
    nice greetings, Sandra

    #106271
     Radu
    Moderator

    You’re welcome

    Don’t forget to rate our theme 5 stars on Themeforest since it will really help us.

    Cheers

    Radu

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

    Done!

    #106291
     Radu
    Moderator

    Thank you much Sandra

    Have a nice week

    Cheers

    Radu

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

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?