The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

how to override wp_list_pages to produce different HTML/CSS? (2 posts)

  1. talimoon
    Posted 7 years ago #

    Hi all,

    I'm trying to create my own theme but I've hit a little snag.

    I want to style the page navigation in my own way however for this i need to change the html output of the wp_list_pages function.

    I've dug a bit and found that i can override the Walker class but the wp_list_pages calles walk_page_tree (both are in wp-includes\post-template.php) and that one uses the default override class Walker_Page and i dont want to ammend the core source of wp.

    How do i go about doing this?

    Please help,

  2. Ulsen
    Posted 6 years ago #


    I got the same problem ... I want to add classes to the ULs and LIs and want to put them in DIVs and put SPANs into them to have more CSS possibilities.

    Does anyone know if and how this tag can be overridden in the theme? Thanks in advance!


Topic Closed

This topic has been closed to new replies.

About this Topic