Core Function
View Source on Trac ↗ get_page_by_title()
get_page_by_title( mixed $page_title, mixed $output = OBJECT, mixed $post_type = 'page' ) Retrieves a page given its title.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $page_title string | Page title. 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 | | array) $post_type Optional. Post type or array of post types. Default 'page'. Required |
Return Value
((WP_Post)
| array | null) WP_Post (or array) on success, or null on failure.
Function Information
Since Version
2.1.0
Source File
wp-includes/deprecated.php
Advertisement