Create a custom walker class to extend wp_list_pages
The Walker class in WordPress is used to create hierarchical navigation links. It works by ‘walking’ — or iterating — over the data in the database and then outputting the results according to the parameters that have been set. The nice thing is that by using inheritance the class can be extended and manipulated in a child theme to output in a way that might be more suitable to the project at hand.
Continue reading
