WordPress.org

Ready to get started?Download WordPress

Forums

ascending menu array (1 post)

  1. bnther
    Member
    Posted 3 years ago #

    I've got a custom sidebar menu that I want to sort alphabetically by title.

    The menu call is:

    <?php wp_nav_menu( array( 'theme_location' => 'member-menu')) ?>

    The function is written:

    `function register_my_menus() {
    register_nav_menus(
    array(
    'member-menu' => __( 'Member Menu' ),
    'gallery-menu' => __( 'Gallery Menu' ))
    );
    }`

    I'm trying to ascend by title:

    . '&orderby=title&order=asc'

    I'm thinking that the array should be sorted before I call it -- meaning I should include it the in the function. But I was unable to get that to work.

    Any thoughts?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.