learndash_get_page_by_path( string $slug = '', string $post_type = '' )
Gets the page data by page path.
Description #
Parameters #
- $slug
-
(string) (Optional) The slug of the page.
Default value: ''
- $post_type
-
(string) (Optional) The post type slug.
Default value: ''
Return #
(WP_Post|array|null) WP_Post
object or array on success, null on failure.
Source #
Changelog #
Version | Description |
---|---|
2.5.2 | Introduced. |