• Hi there, we’re adapting an existing design (this one) to a WordPress template, and would like to change the left-hand navigation to be created with wp_list_pages or a similar template tag.

    But wp_list_pages uses a <ul><li>{first level heading}<ul><li>{second level heading} structure for second-level navigation, whereas we use a <h2>{first level}</h2> <ul><li>{second level}.

    The CSS and JavaScript is already written to handle the second way, so I’d like to change or create something in WordPress that can create that structure.

    What’s a best practice way to create something that won’t require much maintenance, and will remain compatible with WordPress long into the future? I’m new to WordPress development, so there might be something I’m overlooking!

    Thanks for any help or suggestions.

  • The topic ‘What’s the right way to change wp_list_pages’s output?’ is closed to new replies.