Skip to content

Instantly share code, notes, and snippets.

@n1k1c4
Last active July 31, 2017 10:22
Show Gist options
  • Save n1k1c4/483f02436075a77f35aac1adb702182f to your computer and use it in GitHub Desktop.
Save n1k1c4/483f02436075a77f35aac1adb702182f to your computer and use it in GitHub Desktop.
WordPress - Show template file name
<?php if (current_user_can('administrator')) : ?>
<div class="for-develop" style="position: fixed; min-width: 15%; height: 32px; background-color: #E91E63; top: 0; left: 750px; z-index: 100000; color: #fff; text-align: center; line-height: 1.8;">
<?php global $template; echo basename($template); ?>
</div><!-- /.for-develop -->
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment