I’m listing out all my wordpress pages and a little bit of their content using a foreach loop like the following:
$allPageIDs = get_all_page_ids();
foreach($allPageIDs as $pageID) {
$page_data = get_page( $pageID );
$content = apply_filters('the_content', $page_data->post_content);
$title = $page_data->post_title;
?>
}
?>
However, there is a problem. They’re displaying out of order. Since it’s going by page id, it’s going in the order that I created them, and not their set post order. Any Idea how I can fix this?