I’m currently using ‘wp_list_pages’ to display child pages within my wordpress website.
Here is my code to display the pages;
wp_list_pages("title_li=&child_of=".$post->ID."&show_date=modified&date_format=$date_format&location=sidebar&sort_column=menu_order");
This works fine but I want to be able to count the list of results.
How can you count this?
You’ll have to use
get_pageswhich will return an arraywp_list_pagesusesget_pagesto retrieve the data and performs extra formatting