WordPress.org

Support

Support » Themes and Templates » How to remove title attribute from page link in wp_list_pages?

How to remove title attribute from page link in wp_list_pages?

  • 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.

Viewing 1 replies (of 1 total)
  • 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. :-/

Viewing 1 replies (of 1 total)
  • The topic ‘How to remove title attribute from page link in wp_list_pages?’ is closed to new replies.
Skip to toolbar