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