This WordPress plugin is intended for theme developers to use. It shows the current template being used to render the page, current post type, and much more.
composer require wpackagist-plugin/what-template-am-i-using
Since this plugin is in the WordPress plugin directory, it can be installed through the plugin search in the WP admin.
WordPress Admin > Plugins > Add New > Search: What Template Am I Using
This will install the version that is in the WordPress plugin directory.
wp plugin install what-template-am-i-using --activate
If you don't see what you're looking for in the panels I've provided, its easy to add your own.
- Create a class that extends
WTAIU_Panel
. Take a look at inc/core-panels.php for examples. - Add it to the sidebar with the
wtaiu_setup_panels
action. Seesetup_wtaiu_panels()
for example.
add_filter('wtaiu_handle_text', function( $text ) {
return 'Your Custom Text Here';
} );
function wtaiu_can_show( $can_show, WTAIU_Panel $panel ) {
if ( is_a( $panel, 'WTAIU_Theme_Panel') )
return false;
return $can_show;
}
add_filter('wtaiu_panel_can_show', 'wtaiu_can_show', 10, 2 );
To find the public IP address of your server, a request is made to an external website that echos back the IP. You can easily change the URL that is used.
add_filter('wtaiu_find_public_ip_url', function( $url ) {
return 'http://example.com/';
} );