-
Author
-
December 10, 2017 at 11:14 #182532anonim_2mParticipant
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! 🙂
December 10, 2017 at 16:40 #182552Kieran_SQModeratorHi,
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 solutionIf 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.
December 11, 2017 at 22:12 #182725Kieran_SQModeratorEsti 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 solutionIf 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.
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.