• Resolved bakerjohnj

    (@bakerjohnj)


    Hi. I am trying to create a drop-down menu but the submenus just appear to the right of the parent menu rather than dropping down. This is my first website, https://www.peacebewithus.com. My theme is pretty obscure. White-Xmas. It supports custom menus but maybe not drop-downs? If not, is there a way to add that functionality? Thanks for any help.

    JB

Viewing 9 replies - 1 through 9 (of 9 total)
  • David_G

    (@questas_admin)

    Thread Starter bakerjohnj

    (@bakerjohnj)

    Thanks Questas but still no luck. From what I understand, I must use child pages of the parent page I wish to drop down from. If you look at my page, Boas Noticias is a child page of Good News and its sub-menu but it still appears to the right. Is it possible my theme does not support drop-downs?

    Thanks again,
    JB

    David_G

    (@questas_admin)

    In the menu setup, the Boas Noticias is below Good News. Slide the Boas Noticias one notch to the right. It is shown in the video. Then it becomes a sub of Good News.
    I hope that makes sense.

    David_G

    (@questas_admin)

    In your Dashboard > Appearance > Menu

    Current Menu:

    GOOD NEWS
    BOAS NOTICIAS

    Here is what you want to see:

    GOOD NEWS
    ….BOAS NOTICIAS

    (ignore the …. just used for spacing here)

    Thread Starter bakerjohnj

    (@bakerjohnj)

    Hmm. Not sure what you are seeing because it is definitely slid to the right here. It even says “sub-item” and I have hit save menu a few times so I dunno.

    Oy,
    JB

    David_G

    (@questas_admin)

    This is a deliberate decision by your theme’s author. Instead of implementing dropdown menus, the author has chosen instead to display all menu items in a long list, as you’re seeing on your site.

    You could change this in a child theme by copying header.php from your parent theme’s folder to the child theme’s folder and then changing line 33 from

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => -1, 'menu_id' => 'menu-container',) ); ?>

    to

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'menu-container',) ); ?>

    You would then have to code in the dropdowns with some CSS. This should be enough to at least get you started:

    @media screen and (min-width: 601px) {
    	.main-navigation li {
    		position: relative;
    	}
    
    	.main-navigation ul ul {
    		display: none;
    		position: absolute;
    		top: auto;
    	}
    
    	.main-navigation li:hover > ul {
    		display: block;
    	}
    }
    Thread Starter bakerjohnj

    (@bakerjohnj)

    Ah ok. Do you think it’s a bug in the theme? Not sure but I was under the assumption that Custom Menu support included drop-downs.

    Thread Starter bakerjohnj

    (@bakerjohnj)

    Wow. Thanks Steven. That did the trick.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Drop-down menu help’ is closed to new replies.