Created
May 24, 2021 11:22
-
-
Save robertannett/1c5350847dff1f840f0b11422a9ac8a7 to your computer and use it in GitHub Desktop.
WP Template Finder
This file contains hidden or 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
// Place me in the header | |
<?php if (defined('WP_DEBUG') && true === WP_DEBUG) { ?> | |
<div style="background: lightslategray; color: white; position: fixed; bottom: 1rem; right: 1rem; z-index: 9999; padding: 1.5rem 2rem 0.5rem;"> | |
<p style="color: white; font-weight: bold;">DEBUG INFO</p> | |
Page ID: <?= $post->ID; ?><br /> | |
Post Type: <?= $post->post_type; ?><br /> | |
Template: <?= basename(get_page_template()); ?></p> | |
<hr /> | |
<p><a href="/wp-admin/post.php?post=<?= $post->ID; ?>&action=edit" style="text-decoration:underline; color: white;"><b>Edit Page</b></a></p> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment