WordPress.org

Ready to get started?Download WordPress

Forums

How to show Category Description on Menus (1 post)

  1. Tran Dinh Khanh
    Member
    Posted 2 years ago #

    Hi all,
    I'm now building a TwentyEleven child theme.
    I use this code to override the default wp_nav_menu_items (to add Home link with custom class)

    function new_nav_menu_items($items) {
        $homelink = '<li class="logo"><a href="' . home_url( '/' ) . '">' . __('Home') . '</a></li>';
        $items = $homelink . $items;
        return $items;
    }
    add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );

    It works fine, but shows only category's title.
    Now I'd like to show category's description as well.
    So, how to do that? What code should be added?

    Thanks in advanced.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Tran Dinh Khanh
  • This topic is not resolved
  • WordPress version: 3.3.1