• Hello,

    I made the menu: Home – Blog – Vision – About me – Contact (desktop: horizontal)
    But if I go the mobile view (is vertical) I see the menu backwards:
    – Contact
    – About me
    – Vision
    – Blog
    – Home

    Can someone help me to change the order of my mobile menu?

    I think something has to be modified in the header.php, below the part about the menu:

    <ul class=”blog-menu”>

    <?php if ( has_nav_menu( ‘primary’ ) ) {

    wp_nav_menu( array(

    ‘container’ => ”,
    ‘items_wrap’ => ‘%3$s’,
    ‘theme_location’ => ‘primary’,
    ‘walker’ => new hemingway_nav_walker

    ) ); } else {

    wp_list_pages( array(

    ‘container’ => ”,
    ‘title_li’ => ”

    ));

    } ?>

    <div class=”clear”></div>

    <ul class=”mobile-menu”>

    <?php if ( has_nav_menu( ‘primary’ ) ) {

    wp_nav_menu( array(

    ‘container’ => ”,
    ‘items_wrap’ => ‘%3$s’,
    ‘theme_location’ => ‘primary’,
    ‘walker’ => new hemingway_nav_walker

    ) ); } else {

    wp_list_pages( array(

    ‘container’ => ”,
    ‘title_li’ => ”

    ));

    } ?>

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Jeltien

    (@jeltien)

    Can someone please help me resolve this question?

    Interesting!
    I’m afraid I’ve not seen anything like this ??

    Is it your Primary Menu?

    Thread Starter Jeltien

    (@jeltien)

    Yes, I have 1 menu, so also the primary menu. The mobile menu is vertical, the pc menu is horizontal. If the horizontal menu is in the right order, the mobile menu is backwards. And if the mobile menu is correct, the horizontal menu is backwards.

    I hope someone can help me out with this problem!

    Hmmmmmm. Please share your website and we can take a look.

    Thread Starter Jeltien

    (@jeltien)

    Sorry I didn’t share the website sooner, but it was still offline before.
    Now the website is online and I hope someone can help me to help this last problem. Thanks in advance.

    https://www.opsleeptouw.com

    Thread Starter Jeltien

    (@jeltien)

    Anyone who can help me out?

    Thread Starter Jeltien

    (@jeltien)

    I am still looking for a solution and I hope someone can help me with this problem.

    Can I maybe reverse only the mobile order with the php below?

    <ul class=”mobile-menu”>

    <?php if ( has_nav_menu( ‘primary’ ) ) {

    wp_nav_menu( array(

    ‘container’ => ”,
    ‘items_wrap’ => ‘%3$s’,
    ‘theme_location’ => ‘primary’,
    ‘walker’ => new hemingway_nav_walker

    ) ); } else {

    wp_list_pages( array(

    ‘container’ => ”,
    ‘title_li’ => ”

    ));

    } ?>

    • This reply was modified 7 years, 11 months ago by Jeltien.
    Thread Starter Jeltien

    (@jeltien)

    I changed in the CSS the rule below to left instead of right. This reverse the menu order, but now the alignment is left and I like to align the menu right.
    .blog-menu > li { float: left; }

    .mobile-menu { display: none; }

    .blog-menu li { position: relative; }
    .blog-menu > li { float: left; }

    .blog-menu > li:before {
    display: block;
    position: absolute;
    left: 0%;
    top: 50%;
    margin-top: -9px;
    margin-left: -3px;
    font-size: 16px;
    color: #444;
    font-weight: 300;
    z-index: 1000;
    }

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Mobile menu backwards’ is closed to new replies.