WordPress.org

Ready to get started?Download WordPress

Forums

How to change from one nav to the other after log in (2 posts)

  1. Dustin1
    Member
    Posted 1 year ago #

    After a member logs in, how would you change the temple to be able to switch to the other nav bar? I have created one for guests and one for members and if the members log in, I want it to access the member's bar. I'm using the Esplanade theme.

  2. Mark Wilkinson
    Member
    Posted 1 year ago #

    You would need something along these lines in your template file where the nav is called:

    <?php
    if( is_user_logged_in() ) {
      // code for navbar for logged in users
    } else {
      // code for navbar for none logged in users
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic