• Resolved lberelson

    (@lberelson)


    I’ve looked at the api and i don’t see a way to order the menus according to the ordering customized in appearance menus. This code orders according to date creation of page??
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘container’ => ‘navcontainer’, ‘container_class’=> ‘menusimple’ )); ?>
    Does this need special conditioning?

Viewing 10 replies - 1 through 10 (of 10 total)
  • No. If you use a custom menu, the order of your menu items in the back end will be reflected in the front end of the site by default.

    Thread Starter lberelson

    (@lberelson)

    Well if i understand you correctly you’re saying it’s automated. But that’s not occurring in my implementation:
    http://howlingwolfmedia.com/site3/
    menus currently read as follows:
    Become a Member | Classes | Fitness Programs | Mindy Body | My Club…
    But here’s the order in menu
    http://snag.gy/Z6uHH.jpg

    Can you replicate the problem using the default theme with all plugins deactivated?

    And why are you using an old copy of WordPress? Were you aware that your site is currently running a very real risk of being hacked. You need to upgrade WordPress asap.

    Thread Starter lberelson

    (@lberelson)

    Yep same problem when using TwentyEleven. Here is the code i used for registering the menus:

    <?php
    /*
     * Functions file
     * Includes all necesary files
     *
     * @package custom
     */
    
    function register_my_menus() {
      register_nav_menus(
        array(
          'primary-menu' => __( 'Primary Menu' ),
          'secondary-menu' => __( 'Secondary Menu' )
        )
      );
    }
    add_action( 'init', 'register_my_menus' );
    
    ?>

    I’m trying to create a custom theme which is the point of this project. This is a dev install with a multi site network so i’m not planning on upgrading for some time. No plugins were used on this install. I just assumed it was as parameter change in the call for menu nav.

    I cannot replicate your problem using 2012 in the current version of WordPress.

    Thread Starter lberelson

    (@lberelson)

    @esmi ok i understand. It was interesting b/c i have 3 sites off this installation. Two of them used pure child themes, the other custom. http://www.howlingwolfmedia.com/site1 … /site2… /site3
    Regardless of switching themes, only site1 reflects the order change in the nav.

    I can only assume that this is an issue in your themes or the sites. I’ve created dozens of themes that make use of wp_nav_menu() and the re-ordering of items in a custom menu worked perfectly in all of them.

    Thread Starter lberelson

    (@lberelson)

    ok thanks anyhow.

    Thread Starter lberelson

    (@lberelson)

    Could the issue be perhaps in the menu_id parameter. Right now it’s alphabetizing by page title. I’ve added a menu id param but still not working. Registration code for menus as per above.

    <?php wp_nav_menu( array( 'theme_location' => 'primary',  'container' => 'navcontainer', 'container_class'=> 'menusimple', 'menu_id' =>'primary' )); ?>

    Thread Starter lberelson

    (@lberelson)

    I ‘ahem’ think i neglected to actually reorder them within the dashboard widget. That is what i believe was the issue. Thanks @esmi for your reply.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘wp nav menu parameters’ is closed to new replies.