WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Menu question (2 posts)

  1. Victor Petrescu
    Member
    Posted 3 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    <?php
    $current_menus = get_theme_mod( 'nav_menu_locations' );
    $sidebar_menu = wp_get_nav_menu_object($current_menus['sidebar']);
    echo $sidebar_menu->name;
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags