Brendan Nee

Tag Archives: array

List pages in wordpress into a PHP Array

April 10th, 2008

Update: Thanks to Joost in the comments for suggesting the use of get_pages() to accomplish the same thing as what I posted below. He posted the example: $pages = get_pages(‘child_of’ => [[THE PARENT ID]], ’sort_order’ => ‘ASC’); foreach ($pages as $page) { // Do your thang } This seems much better than what I had [...]