Support » Fixing WordPress » Add title attribute in wp_list_pages

  • Resolved virendra930


    Hii ,
    I am using wp_list_pages( $args ) function in a template its working fine and the output is

    <a href="">Home</a>

    but I want to add title attribute also for example

    <a href="" title="Home">Home</a>

    Please help me out
    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • that should be doable by extending the walker class. Not sure about the exact code at the moment but there are many blogs describing the process.

    StackOverflow has a good solution.

    Basically wp_list_pages doesn’t have a title=”attribute” option, so you’d write your own function.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add title attribute in wp_list_pages’ is closed to new replies.