Mobile and web design development (Android, iPhone, WordPress)
Google+TwitterLinkedinFacebook
Subscribe
HomeWordPressWordpress get_pages() function

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

Responses

  1. mekele says

    Helped, thanks.

Leave a Reply

  • Hi, I'm Gerry. Welcome to my blog and sites about mobile, technology, The Pinoy, #crazyidea, games, WordPress, Ubuntu, Mac, iOS, Android, Symbian... I started sites like Ortigas Online and iMakati which focuses on local community information. Read more about Gerry
    Status (Twitter, Linkedin, Facebook...)

    Just found out that the Android-based HTC Sensation XL phone is now in the Philippines for about Php 28,000.

  • Visit my other sites

    • Gerry

      My blog about the Philippines, mobile, technology, games, mac, linux...

    • Apps & Games

      Reviews, news of mobile apps & games for Android, iOS, Blackberry, Symbian...

    • Connected Phone

      The computer is the mobile phone. The always connected phone evolution.

    • Pinoy Me

      Pinoy businesses, enterprises, startups, professionals all over the world

    • Java Midlet

      Java mobile apps & games - news, reviews, tips, mobile phone & devices

  • PINOI Sites

    Are you interested in putting up your own PINOI-enabled local community site? Contact me

    • PINOI

      Enabling local communities on the Internet

    • Makati

      iMakati.com is a site that provides information about Makati City.

    • Ortigas

      Community site that provides information about the Ortigas Center.