Title: wp_list_pages html problem
Last modified: August 19, 2016

---

# wp_list_pages html problem

 *  [Valerio Vaz](https://wordpress.org/support/users/vvaz/)
 * (@vvaz)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/wp_list_pages-html-problem/)
 * HI, have a little problem with wp_list_pages.
 * Right now i have this:
    <?php wp_list_pages(‘title_li=’); ?>
 * And the generated HTML brings me this code:
 * <span><li class=”page_item page-item-2″>[about](http://exemple.com/about/)
    </
   span>
 * but i want ti to be like this:
    <li class=”page_item page-item-2″>[<span>about</span>](http://exemple.com/about/)
 * How can i do that ?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Valerio Vaz](https://wordpress.org/support/users/vvaz/)
 * (@vvaz)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/wp_list_pages-html-problem/#post-850207)
 * damm sorry… the code that HTML gives me is:
 *     ```
       <span><li class="page_item page-item-2"><a href="http://exemple.com/">home</a></li>
       </span>
       ```
   
 * and i want it to be:
 *     ```
       <li class="page_item page-item-2"><a href="http://exemple.com/"><span>home</span></a></li>
       </span>
       ```
   
 *  [Evita](https://wordpress.org/support/users/evita/)
 * (@evita)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/wp_list_pages-html-problem/#post-850243)
 * I´m not sure but I believe you can´t do this without hacking WordPress core files.
   If you look in the [codex](http://codex.wordpress.org/Template_Tags/wp_list_pages)
   I see there no chance to put span-tags (or a seperator) into the created list.
 *  [Technokinetics](https://wordpress.org/support/users/technokinetics/)
 * (@technokinetics)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/wp_list_pages-html-problem/#post-850482)
 * You can add spans to give `<li><span><a href="#">Link</a></span></li>` using 
   [Page Lists Plus](http://wordpress.org/extend/plugins/page-lists-plus/).
 * Will that do?
 * – Tim
 *  [SuiteJ](https://wordpress.org/support/users/suitej/)
 * (@suitej)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/wp_list_pages-html-problem/#post-850527)
 * This cured a big freakin’ headache for me. (Page Lists Plus) Thanks so much! 
   🙂
 * Cheers!
    Jay

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘wp_list_pages html problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [SuiteJ](https://wordpress.org/support/users/suitej/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/wp_list_pages-html-problem/#post-850527)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
