BuddyBoss Home – Web › Support Forums › Themes › BuddyBoss theme › Custom homepage for unlogged in users
Tagged: Custom homepage
- This topic has 10 replies, 4 contibutors, and was last updated 9 years, 10 months ago by jamie.
Question
October 28, 2014 at 9:38 pm #33054@jamie771How can I create custom homepage for unlogged in users, instead of taking them to activity page right away?
Answers
October 29, 2014 at 3:26 am #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.
October 29, 2014 at 12:20 pm #33067@jamie771Thanks 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.
October 29, 2014 at 1:16 pm #33069@alyssa-buddyboss
AlyssaParticipant@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 }
October 29, 2014 at 8:10 pm #33095@goofdog88Hi @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
December 1, 2014 at 9:33 pm #33752@jamie771@goofdog88 Sorry for late reply. You have to customize it in Appearance -> Customize ->Static Front Page
January 4, 2015 at 5:18 pm #34376@jamie771Finally found that I was looking for. This is something what would be great to add to the theme in general.
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!!!
January 4, 2015 at 9:32 pm #34386@jamie771Also 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.
January 4, 2015 at 9:43 pm #34387@alyssa-buddyboss
AlyssaParticipant@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.
January 4, 2015 at 10:10 pm #34388@jamie771Thank 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.
January 4, 2015 at 11:51 pm #34391@jamie771Also 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;
}
- The question ‘Custom homepage for unlogged in users’ is closed to new replies.