Thanks for helping me about previous questions. I’m very appreciated the BuddyDev team. You both did a very good job, well done!
Currently, I met an issue that I have a separate landing page which is based on Bootstrap. I just wonder that how can I add these files as WordPress Front Page, which means by default all visitors will access to this page. And after they log in, it will redirect to different page. Vice versa, after user log out the site, it will redirect to this landing page, either.
Could you offer me some ideas about this process?
Thank you very much.
Thanks for the appreciation. There are many ways to accomplish this. You can try this by creating a file with name ‘front-page.php’ in your current theme.
And place the following code in it and modify it as per you need also please keep in mind the settings for front page in admin section set to be your latest post.
<?php /** * * Site Front-page * */ ?> <?php get_header(); ?> <?php if( is_user_logged_in() ) : ?> <?php // Place content You want to display on home page after user logged in. ?> <?php else: ?> <?php // Place content You want to display on home page when user logged not in. ?> <?php endif; ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
Please let me know if it is works for you or not.
You must be logged in to reply to this topic.