get_page


get_page ( $page, $output = OBJECT, $filter = 'raw' )

Parameters:
  • (int|WP_Post) page Page object or page ID. Passed by reference.
  • (string) output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
  • (string) filter Optional. How the return value should be filtered. Accepts 'raw', 'edit', 'db', 'display'. Default 'raw'.
Returns:
  • (WP_Post|array|null) WP_Post or array on success, null on failure.
Defined at:

Description

Retrieves page data given a page ID or page object.Use get_post() instead of get_page().

Related Functions

get_pages, get_page_uri, get_tag, get_page_link, get_tags

Top Google Results

User discussions

wpseek mobile