Hello,
My Goal:
I need a second menu at the very top of my website. I want it to be responsive and morph into a button for mobile devices.
My Preference:
I want to add a custom menu from the WP Dashboard to the Topbar Menu so it displays my menu when I edit it using WP Dashboard in Appearance > Menus. I understand to do any php edits to Theme X I must use the Child Theme.
My Own Attempt:
I have built it here ( http://www.jaimeluishernandez.com/ ) using bootstrap code I found on W3Schools.com’s website but then realized the links on this menu will not feed from the WP Dashboard > Appearance > Menus when I rearrange and edit the menus there. I will have to manually code the links of the pages and I don’t want to do that. I want the topbar menu to link and work smoothly from the WP Dashboard.
Old Themeco Post:
I found this article on google but I am not sure if this is teaching how to do what I am asking. Also, it is very old and may be outdated. https://theme.co/apex/forums/topic/menu-in-top-bar/
Here is the code on that link (if for some reason it doesn’t link properly):
<?php // ============================================================================= // VIEWS/GLOBAL/_TOPBAR.PHP // ----------------------------------------------------------------------------- // Includes topbar output. // ============================================================================= ?> <?php if ( x_get_option( 'x_topbar_display', '' ) == '1' ) : ?><?php echo x_get_option( 'x_topbar_content' ); ?>
<?php endif; ?> <?php wp_nav_menu( array(
'menu' => 'topbar-menu',
'container' => false,
'menu_class' => 'x-nav sf-menu',
'container' => 'div',
'container_class' => 'top-menu',
) );
?>
<?php x_social_global(); ?>
</div>
Thank you for your help.