I'm working on a wordpress site where I'm trying to get the "Members" login/logout link & widget area inserted into the actual end of my front-end-nav-menu
instead of after, as it's currently positioned. The reason for this is when a user visits the website on a smaller screen the "Members" link and facebook icon (that I've placed in the widget area) stays to the far left under the nav menu instead of staying in line with the nav menu links.
My code on the header.php
files is here:
<div class="front-end-nav-menu primary-nav">
<?php wp_nav_menu( array('menu' => 'Front End Menu') ); ?>
<div id="menu-items">
<div id="login-logout-header-button">
<?php if ( ! is_user_logged_in() ) { ?>
<a href="<?php echo wp_login_url( wp_guess_url() ); ?>" class="logged-button"><?php _e( 'Members', APP_TD ); ?></a>
<?php } else { ?>
<a href="<?php echo wp_logout_url( wp_guess_url() ); ?>" class="logged-button"><?php _e( 'Logout', APP_TD ); ?></a>
<?php } ?>
</div><!-- /login-logout-header-button -->
<div id="facebook-desktop">
<?php if ( ! dynamic_sidebar( 'facebook' ) ) : ?>
<?php endif; ?>
</div>
</div><!-- /menu-items -->
</div><!-- /front-end-nav-menu primary-nav -->
Is there a way to have this #menu-items
section in a function an the add the function into the nav bar?