Wordpress get_pages() function
Defined in: wp-includes/post.php
Retrieves a list of pages from the site’s wp_posts table. In Wordpress posts and pages are store in the same table called wp_posts. Pages are identified by the string ‘page’ stored in the post_type field. This function will return an array list of pages depending on the $args array of options passed to the function.
The get_pages filter is applied to the resulting array list of pages before returning from the calling code. The resulting array list of pages and the list of options passed to get_pages are passed as parameters to the get_pages filter.
array get_pages( [array $args] )
Possible values for $args and their default values:
- child_of
- default is 0
- sort_order
- default is ‘ASC’
- sort_column
- default is ‘post_title’ (this can be any of the column names in wp_posts, tip: you can use ‘menu_order’ to control the order)
- hierarchichal
- default is 1
- exclude
- no default value
- include
- no default value
- meta_key
- no default value
- meta_value
- no default value
- authors
- no default value







