Warning: This function has been deprecated. Use get_post() instead.
get_page( mixed $page, string $output = OBJECT, string $filter = 'raw' )
Retrieves page data given a page ID or page object.
Description Description
Use get_post() instead of get_page().
Parameters Parameters
- $page
-
(mixed) (Required) Page object or page ID. Passed by reference.
- $output
-
(string) (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 value: OBJECT
- $filter
-
(string) (Optional) How the return value should be filtered. Accepts 'raw', 'edit', 'db', 'display'.
Default value: 'raw'
Return Return
(WP_Post|array|null) WP_Post (or array) on success, or null on failure.
Source Source
File: wp-includes/post.php
function get_page( $page, $output = OBJECT, $filter = 'raw' ) { return get_post( $page, $output, $filter ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.5.0 | Use get_post() |
1.5.1 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Add the content of a page anywhere with separated title.