How to remove title attribute from page link in wp_list_pages? (2 posts)

  1. peterkz
    Posted 9 years ago #

    Hi! I am creating a menu that lists site pages with the following code:

    <?php wp_list_pages('sort_column=menu_order&title_li='); ?>

    The rendered output contains li items with links inside. These links have a title attribute repeating the name of the page (which is in the link text already):

    <a href="http://example.com/mypage" title="My Page">My Page</a>

    How do I get rid of the title attribute? Having the same text in the title attribute and link is pointless and may confuse screen reader users.

  2. Hoofed
    Posted 9 years ago #

    I have the same problem. I can't find an explanation in the documentation, or anywhere else, as to why the title attributes are there, how to change them or how to completely remove them. :-/

Topic Closed

This topic has been closed to new replies.

About this Topic