Last active
March 9, 2021 02:34
-
-
Save yellowberri-snippets/a5788465cdc7cff98e23 to your computer and use it in GitHub Desktop.
PHP: WP: Get Page Template File Name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$template = get_page_template(); | |
$template = explode('/', $template); | |
$template = end($template); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment