/    Sign up×
Community /Pin to ProfileBookmark

Two Menus Displaying with Responsive Code

I don’t often ask for help… but I’ve found myself in a bit of a bind. I’m trying to add a second menu onto a WordPress site and was able to register the location, and create a top menu using the wp_nav_menu function. Unfortunately this isn’t responsive and if you view it on mobile or shrink the browser size it becomes jumbled instead of a drop down menu. The menu already used in the theme is responsive but when I use the code at the very top of the header it displays two menus. The website is tetononcology.com and here’s the code I’m trying to use in the top menu bar (removing everything else up there). I really appreciate any help anyone can give.

[CODE]
<?php
// main menu
echo ‘<div class=”navigation-wrapper”>’;
if( has_nav_menu(‘main_menu’) ){
wp_nav_menu( array(‘container’ => ‘div’, ‘container_class’ => ‘menu-wrapper’, ‘container_id’ => ‘main-superfish-wrapper’, ‘menu_class’=> ‘sf-menu headermenu’, ‘theme_location’ => ‘header-menu’ ) );
}
echo ‘</div>’; // navigation-wrapper
echo ‘<div class=”clear”></div>’;

// responsive menu
if( $gdl_is_responsive && has_nav_menu(‘main_menu’) ){
dropdown_menu( array(‘dropdown_title’ => ‘– Main Menu –‘, ‘indent_string’ => ‘- ‘, ‘indent_after’ => ”,’container’ => ‘div’, ‘container_class’ => ‘responsive-menu-wrapper’, ‘theme_location’=>’header-menu’) );
}
?>
[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @lifesalgorithm spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...