Get page templates from active theme?
-
Hi,
wp_get_theme()->get_page_templates(); returns an array of all page templates in both theme and child theme folder.
Now, how can I only return page templates from one of these locations?
Like this:
– If child theme is NOT active, get page templates from theme folder.
– If a child theme IS active, get only page templates from the child theme folderIs this possible?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get page templates from active theme?’ is closed to new replies.