WordPress.org

Ready to get started?Download WordPress

Forums

Frau
[resolved] Dropdown menus in cell (4 posts)

  1. antonio1912
    Member
    Posted 1 year ago #

    Hi.

    Two dropdown menus appears when I navigate to the page with my cell. The first one is apparently useless. How can I make disappear the first menu?

    Thanks in advance.

    PD: Great free demo. Works perfectly with WooCommerce.

  2. jminton66
    Member
    Posted 1 year ago #

    Hi Antonio, I had the same issue and the way I recall getting rid of that menu (it's called the "secondary menu") was to comment out the code pertaining to it in the header.php file. I'm not sure how fluent you are in php, html, etc., so I'll be fairly basic here.

    Warning: you may first want to back up the file you're about to edit, or create a child theme to do your work in, so you don't inadvertently mess up anything in the header file (which is a pretty crucial one).

    Go to the Editor under Appearance, and click on the header.php file. Search for the word "secondary" and you should come up with this piece of code:

    <?php if ( $settings['elements']['secondary-menu']['show'] || is_super_admin() ) { ?>
    		<div class="hd-right lzblock" <?php if (!$settings['elements']['secondary-menu']['show']&&is_super_admin()) echo 'style="display:none"'; ?> data-block="secondary-menu">
    		<?php wp_nav_menu( array( 'theme_location' => 'header-menu2',
    'container'       => 'div',
    	'container_class' => 'nav-menu',
    	'container_id'    => 'secondary-menu',
    	'fallback_cb'=>'theme_secondary_menu'
    	) ); ?>
    		</div>
    		<?php } ?>

    All I did was add comment code to either side of it: <!-- at the beginning, and --> at the end, and that removed the menu entirely. So ultimately that line of code should appear as

    <!--<?php if ( $settings['elements']['secondary-menu']['show'] || is_super_admin() ) { ?>
    		<div class="hd-right lzblock" <?php if (!$settings['elements']['secondary-menu']['show']&&is_super_admin()) echo 'style="display:none"'; ?> data-block="secondary-menu">
    		<?php wp_nav_menu( array( 'theme_location' => 'header-menu2',
    'container'       => 'div',
    	'container_class' => 'nav-menu',
    	'container_id'    => 'secondary-menu',
    	'fallback_cb'=>'theme_secondary_menu'
    	) ); ?>
    		</div>
    		<?php } ?>-->

    Let me know how it works for you.

    --JM

  3. antonio1912
    Member
    Posted 1 year ago #

    Hey! Great advice. This worked very well.

    Thanks!

  4. antonio1912
    Member
    Posted 1 year ago #

    Sorry I forgot to close the topic.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic