What Wordpress Template is being used

Which Wordpress template is used?

Determine which template WordPress uses for a contribution or page. Quickly find out which template is used for a page or article in your WordPress topic without going through each template automatically. WorldPress uses a template tree that is built in a hierarchical order of importance, if you're not there, you fall back on the next one in the queue.

To quickly see which template you are using in an archives, post/page, or other mail types, you can include a feature in your functions.php design that displays the location and template name at the bottom of each page. Add_action ('admin_bar_menu','show_template'); globally $template; print_r( $template); Once the feature has been added and you are still registered as administrator, look at a page in the frontend and move down to the bottom line, the used template pathname will be displayed at the bottom of the page - this is only available for registered administrators via the Dashboard.

Once you're done, you can easily annotate out the add_action line by just putting 2 forward oblique lines and then annotate it out when you need to use it again to see the use of the template. //add_action ('admin_bar_menu','show_template'); if you would rather use a plug-in, here is a plug-in that displays the name of the template at the bottom of the page and also has a WordPress shortcut for better referencing the template tree.

Recognize the used WordPress template files

It is a convenient feature I use from period to period when I debug my blog, it prints the name of the template filename used to view the actual page. Don't neglect to annotate or even erase the feature before you go online, otherwise you'll give your website users some pretty futile information.

Simply add the following to your functions.php file: add_action('wp_head','show_template'); globally $template; print_r($template); The Reveal Template plug-in has the same functionality, but is packed as a plug-in. Maybe you should try this if you don't want to add something to your functions.php files.

Mehr zum Thema