In WordPress there are several ways of creating navigation menus. One way is to use the wp_list_pages function to output a list of pages. It works, but unfortunately the resulting HTML is less than ideal.

For many reasons I like my HTML tidy, without redundant class, id, and title attributes. I’ve found two different approaches to cleaning up the HTML created by the wp_list_pages function, and I’ll explain both here.

Read full post

Posted in .