Template hierarchy consist of templates, but not every template file is necessarily in hierarchy.
Essentially hierarchy determines entry points (one of matching templates with pre-defined name structure), but from there template can further load additional arbitrary files.
page-templates
directory holds custom templates for pages (is_page()
branch in hierarchy). It’s recent development that they can now reside in sub-folder.
content-*.php
templates are called by Twenty Twelve like this from other templates: get_template_part( 'content', get_post_format() );
. They are named arbitrarily and not part of template hierarchy – just a code organization choice that developers of this specific theme made.
Related Posts:
- Loading partial templates with AJAX/PJAX
- Templates & CSS – Proper Programming Practice?
- index.php template is used instead of blog page
- Load template file without a post type
- How to apply a custom template for posts by default?
- Unable to include a template
- What should I put on my index.php?
- When a link doesn’t exist, how to tell WordPress what to do? (404 Error Page)
- Is there a way to set different post templates for parent posts and child posts in the same post type?
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- Custom templates vs page-slug
- Understanding the Template hierarchy
- How does WordPress choose archive type template?
- Use one template only for custom post type archives?
- get_month_link uses what wordpress template?
- Differentiation between index.php and page.php
- Single-page.php template file name not shown
- Can I assign a Folder for Post Formats, without it affecting WordPress’ fallback/hierarchical system?
- How to display custom post type?
- Assigning custom page templates to a static blog page
- Archive-custome_post.php template not working
- Organize template parts and page templates in folders in regards of template hierarchy
- User role templates
- Assign template to custom page type?
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- How can I make custom page templates work on child theme?
- Which template(s) to override to use a different sidebar for blog, single posts, categories, blog archive?
- Single Post Templates Doubt
- Page Templates Used in Custom Post Type
- Show a custom template, no matter the page being viewed, if the user is not logged in
- Unload templates; disable parent Template Parts using only “theme.json”
- How do I get the size of an attachment file?
- How to get slug of current category in taxonomy template?
- I put my blog on a subpage, how do I get page title?
- Restrict a search to a custom post type
- Test if page is child and has children, if so echo child pages also on grandchild pages
- How did you incorporate WooCommerce in your own WordPress theme?
- Which template name to use for taxonomies but not their terms?
- Correct process for a new Page Template?
- New Template — copy existing template and change code? [duplicate]
- Same template for all the terms of a taxonomy
- Create a WordPress template without navigation and footer
- Template redirect is_tax() not working
- Show template loaded
- Categories Template Assistance
- How can I make my custom templates respect permissions?
- How to replace WordPress sidebars (widget areas) with Gutenberg
- Turning on the 404 page on localhost
- Checking for page templates in child theme
- WordPress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
- Is there an action hook that fires just before a template is loaded?
- post edit button on front end
- What’s the equivalent of front-page.php for a custom static page?
- Stylesheet comment header: Which header names are mandatory? [duplicate]
- How to add posts list to a page template?
- Valid HTML in Template Part
- Why do I get the same excerpt for all items in my RSS feed?
- What is this code trying to do? It was the cause of my 20s TTFB
- Override template file i subfolders
- Problem when linking out to separate file within foreach loop
- Conditional tags or Multiple files
- Getting term description in single post template
- is_home() returns TRUE on page template
- Can I add a default Block to my custom theme?
- Remove post templates from the selection box menu when creating a single post
- How to convert the WordPress meta box Page Attributes->Page Template dropdown to radio buttons?
- global variables in templates
- Real Time Page Template Preview in WP Admin [closed]
- Best practice to update the file header.php
- page-{slug}.php vs. template-{slug}.php
- wp_enqueue_style and different styles for blog template
- Can I have both front-page.php and index.php?
- get_header(), get_footer() from plugin template
- Problem creating a custom category page with pagination
- how can I add a “read more” tag directly in the template?
- Update template without undoing all my edits?
- How to display specific child page template in wordpress
- The wordpress website is showing ‘w’ while it loads and in the footer
- Is there a wordpress template like this [closed]
- Assign Specific Template for Custom Post slug
- Custom Post Type homepage template
- Why won’t the action hook wp_head accept parameters?
- which template does wp_ tag_ cloud point to?
- Pagination problem (plugin wp-pagenavi) with a custom post type?
- Template part including not working
- Parent/Child themes – both CSS files loaded
- front-page.php includes a placeholder text field. How to get rid of it?
- Display a custom 404 page without a redirect
- WordPress Custom Post Type – Post Attribute: Template. Template shows up and saves on the back end, but the default theme file is being rendered
- Validating Error with submit button
- When to use content-pagename.php?
- Using external file with WP_USE_THEMES set to false causing 404
- How to install a wordpress website template on an existing website?
- Why is my no-results.php template moving my sidebar and footer into the main container?
- Show page title just from the first child-page in template
- How to know which page/file WordPress is expecting?
- AJAX requests within templates
- Page.php vs Single.php
- How to limit block activity (insertion/deletion) to inside of a Block Template on the Admin Screen?
- How to change post template