Navigation Alignment Reverses Order

  • Author
    Posts
  • #26338
    Aaron

    So I noticed that when I switch the alignment of the navigation bar from Center to Right, the order reverses. For example, when I had it centered originally, the menu went “Home, Games, Future Games, Galleries, The Team, and Contact Us”, but when I changed it to Right, it now reads “Contact Us, The Team, Galleries…” etc. I tried reorganizing in WP’s menu section, but it didnt fix this. Is there any way for me to make my menu stay right aligned but keep the original menu order/organization?

    http://angryduckgames.com/wordpress_site/

    #26349
    Aaron

    Nevermind, figured it out. For those who have the same issue, do the following (after backing up your original files!):

    1) Open your nav-menu.php file (located in wp_includes)
    2) at the top, put in the following code:
    add_filter( 'wp_nav_menu_objects', create_function( '$menu', 'return array_reverse( $menu );' ) );
    3) replace your file in the directory

    This will make the menu nav appear in reverse (which is technically the correct order as told from the wp editor. Hope this helps!

    #26360
    Kay
    Cryout Creations mastermind

    Hi Aaron,

    That’s a good temp solution but you’ll lose all those changes when you update WordPress next time. We will add an option to the menu alignment in the next Parabola update to take care of that.

    Until then, if you don’t want to edit any code you could just create a new menu with the menu items order reversed.

    Good luck!


    Before posting consider reading our short theme debugging instructions.
    Please read the FAQs: MantraNirvanaParabolaTempera
    Tutorials: custom menustranslating themeinstalling themecategory page with introdisabling comments Wordpress: child themescategories/posts
    Before making any modifications to your theme we strongly recommend using Child Themes.
    #26365
    Aaron

    Yea I understand Ill lose my change. Its only one line of code though so I can always add it back. I also tried creating a menu in the reverse order, and it never took. The theme always put the navigation in the wrong order when justified right. I dont know why, but this fix works for now.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Navigation Alignment Reverses Order’ is closed to new replies.