BuddyBoss Home – Web Support Forums Themes BuddyBoss theme Custom homepage for unlogged in users

Viewing 11 posts - 1 through 11 (of 11 total)
  • Question

    #33054
    @jamie771

    How can I create custom homepage for unlogged in users, instead of taking them to activity page right away?

    Answers

    #33057
    @style960

    @jamie771 I would personally recommend this – https://wordpress.org/plugins/jonradio-private-site/. It does what it says flawlessly, although it doesn’t cater for different membership levels. S2 might be a better option if you were looking at that.

    #33067
    @jamie771

    Thanks for respond Paul, but it is not exactly what I need at the moment. I don’t need to restrict users from going to activity page. I just want the users, who are not logged in to lend on a home page with log in or register button and description about the site first (instead of on activity page right away). So if user is logged in, he should land on activity page. It is kind of like Facebook has.

    #33069

    Alyssa
    Participant
    @alyssa-buddyboss

    @jamie771 perhaps s2member is the plugin for you. Otherwise you will need to hardcode it into your template. with something like this:

    if(!is_user_logged_in()){
    //Do Stuff
    }else{
    Do Loggedin Stuff
    }
    #33095
    @goofdog88

    Hi @jamie771 – may I ask how you make logged in users hit the activity page instead of the home page?

    I’ve seen a few threads on this, not tried anything yet, however it is something down the road that I would like to implement.

    Thank you

    #33752
    @jamie771

    @goofdog88 Sorry for late reply. You have to customize it in Appearance -> Customize ->Static Front Page

    #34376
    @jamie771

    Finally found that I was looking for. This is something what would be great to add to the theme in general.

    https://premium.wpmudev.org/blog/how-to-build-a-facebook-style-members-only-wordpress-buddypress-site/comment-page-2/#comment-153662

    So I stack on this part: 3) Logged-out menu

    I could not find nothing similar to this in factions.php file:

    if ( ! function_exists( ‘theme_register_menus’ ) ) :
    function theme_register_menus() {
    register_nav_menu(‘top_menu’, __(‘Top Menu’, TEMPLATE_DOMAIN));
    }
    endif;

    Any ideas? Thanks in advance!!!

    #34386
    @jamie771

    Also log in is a bit off on mobile. How can I move word “Password” above the box or make boxes smaller, so word “Username” will be places to the left from the box. login off on mobile

    #34387

    Alyssa
    Participant
    @alyssa-buddyboss

    @jamie771 I’m going to make this so much easier for you.
    Add this to your child theme functions.php file:

    register_nav_menus( array(
    	'logged-out-menu'   => __( 'Logged Out Menu', 'buddyboss' ),
    ) );

    Then copy header.php from the parent theme into child theme and replace this code:
    <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'menu_class' => 'nav-menu clearfix' ) ); ?>
    With this code:

    <?php
    if(is_user_logged_in()){
    wp_nav_menu( array( 'theme_location' => 'primary-menu', 'menu_class' => 'nav-menu clearfix' ) );
    }else{
    wp_nav_menu( array( 'theme_location' => 'logged-out-menu', 'menu_class' => 'nav-menu clearfix' ) );
    }
    ?>

    You will need to create a new menu and then assign it to the Logged Out Menu location on the Manage Locations tab of the edit menu page in the Dashboard.

    #34388
    @jamie771

    Thank you so much! It worked great to change the menu! The only problem it keeps on redirecting me back to the main (welcome) page once I click on the menu items. Even so I changed the templates to Custom Lockdown.

    #34391
    @jamie771

    Also I tried to use this CSS to make everything look better, but it didn’t work for some reason 🙁

    /*LANDING PAGE*/
    #my-custom-home {
    float:left;
    }
    #my-custom-home .post-body img{
    max-height:212px;
    width:auto;
    }
    #my-custom-home h1.post-title, #my-custom-home .post-meta {
    display:none;
    }
    #my-custom-login {
    float:right;
    background:#eee;
    padding:1em;
    }
    #my-custom-registration {
    float:left;
    width:100%;
    }
    #my-custom-registration h2 {
    background:#eee;
    margin:2em 0 0.5em;
    padding:0.5em;
    }

Viewing 11 posts - 1 through 11 (of 11 total)
  • The question ‘Custom homepage for unlogged in users’ is closed to new replies.