Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 2110

Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

44 votes

How do you find out which template page is serving the current page?

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;) There's this handy plugin called Debug Bar. …
Michal Mau's user avatar
  • 3,407
6 votes
Accepted

Get page IDs based on which template they are using?

Try adding page as your post type: $the_query = new WP_Query(array( 'post_type' => 'page', /* overrides default 'post' */ 'meta_key' => '_wp_page_template', 'meta_value' => 'templates
Michal Mau's user avatar
  • 3,407
4 votes

Creating a default Custom Post Template that a Theme can override

There's also a bunch of template related filters (scroll down) you can use to 'hijack' the templates requests and apply your own logic to them. … Here's an example how to hijack the calls for single-saalon_events.php and archive-saalon_events.php and use the files from /your-plugin/templates/ folder instead: # Template for displaying a single event …
Michal Mau's user avatar
  • 3,407