Core Function
View Source on Trac ↗ get_page()
get_page( mixed $page, mixed $output = OBJECT, mixed $filter = 'raw' ) Retrieves page data given a page ID or page object.
Parameters 3 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $page Page object or page ID. Passed by reference. Required |
| 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. Required |
| string | $filter Optional. How the return value should be filtered. Accepts 'raw', 'edit', 'db', 'display'. Default 'raw'. Required |
Return Value
((WP_Post)
| array | null) WP_Post or array on success, null on failure.
Function Information
Since Version
1.5.1
Source File
wp-includes/post.php
Advertisement