Forums

How to customize the HINT in the Menu (7 posts)

  1. volvoxsoft
    Member
    Posted 2 years ago #

    Menu have a little 'hint' that is shown when the mouse goes over it. Exemple, HOME show 'Home' as hint etc. Is it possible to change this hint and any other page on the menu?
    Thanks.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That "Hint" is better know as the link's title attribute. On Page links, it normally defaults to the page title. On category links, it can used to display the category's description.

    http://codex.wordpress.org/Template_Tags/wp_list_categories

  3. volvoxsoft
    Member
    Posted 2 years ago #

    Yes - but how to change the default value for the pages? Any trick? Thanks.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    You can't. It's built into the core for wp_list_pages.

  5. volvoxsoft
    Member
    Posted 2 years ago #

    Ok -ùi see
    title_li' => __('Pages'),

    May be we can change ('Pages') for some php function that would get its value from conditions - something like (if 'page' is 'Home' then title is 'some words') etc. That is an idea - ?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    title_li' => __('Pages'), means "give this list the heading title of Pages". It has nothing to do with the link title attribute. Your only coding option would be to abandon wp_list_pages in favour of a "roll your own" page listing using something like get_pages().

  7. volvoxsoft
    Member
    Posted 2 years ago #

    Ok- thanks. A simple need get complicated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags