BuddyDev

Search

[Resolved] Add separate landing page as WordPress Front Page

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #4199

    Hi,

    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.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #4207

    Hi Dandy,

    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.

    Thank You
    Ravi

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #4228
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #4232
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #4243
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #4247
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #4270

    Hi, Brajesh
    Thanks a million. It works perfectly as I expected!

    Have a good day. Thanks.

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #4271
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #4282

    Hi Dandy,
    Thank yo.
    I am glad it is working.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #4283
    This reply has been marked as private.

You must be logged in to reply to this topic.

This topic is: resolved