WordPress.org

Support

Support » How-To and Troubleshooting » WordPress Menu question

WordPress Menu question

  • Victor Petrescu

    @victor-petrescu

    Hello,
    I am trying to setup a Menu using the new 3.0 Menu feature.
    It’s setup, it works, I can change the CSS style and everything.
    The problem is I want to extract the TITLE of the menu and display it above the menu itself.
    This is because I want to have several menus in the left sidebar and I want to give each of them a title.
    I could just change the title in the Theme for each menu but I wonder how can I extract the menu title and display it next to the menu itself.

Viewing 1 replies (of 1 total)
  • esmi

    @esmi

    Forum Moderator

    <?php
    $current_menus = get_theme_mod( 'nav_menu_locations' );
    $sidebar_menu = wp_get_nav_menu_object($current_menus['sidebar']);
    echo $sidebar_menu->name;
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘WordPress Menu question’ is closed to new replies.
Skip to toolbar