Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yellowberri-snippets/a5788465cdc7cff98e23 to your computer and use it in GitHub Desktop.
Save yellowberri-snippets/a5788465cdc7cff98e23 to your computer and use it in GitHub Desktop.
PHP: WP: Get Page Template File Name
<?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