Wordpress Template Hierarchy Taxonomy
The topic wordpress template hierarchy.
Wordpress template hierarchy taxonomy. The query string is information that is contained in the link to each part of your website. Wordpress uses the query string to decide which template or set of templates should be used to display the page. This conditional tag checks if the taxonomy object is hierarchical. Wordpress display posts in the order determined by the template hierarchy.
When a visitor clicks on a hyperlink to a category tag or custom taxonomy wordpress displays a page of posts in reverse chronological order filtered by that taxonomy. When a person browses to your website wordpress selects which template to use for rendering that page. The template file hierarchy the template file hierarchy overview overview. So wordpress s template hierarchy supports that need.
Page template if the page has a custom template assigned wordpress looks for that file and if found uses it. Taxonomy template hierarchy taxonomy template hierarchy. If even these files are not present it will default to index php. The category php tag php and taxonomy php templates allow posts filtered by taxonomy to be treated differently from unfiltered posts or posts filtered by a different taxonomy.
The template hierarchy exists to make it easier for theme designers and developers to customize the look of a wordpress site. Post refers to any post type posts pages custom post types etc. Make a copy of the single php or archive php file as a starting point. As we learned earlier in the template hierarchy wordpress looks for template files in the following order.
By default this page is. If these files are not available in your theme s directory wordpress will look for archive php and single php respectively. Single of taxonomy term is closed to new replies. This is a boolean function uses a global meaning it returns either true or false a false return value might also mean that the taxonomy does not exist.
Wordpress will work through the template hierarchy and use the template file it comes across first. Why the wordpress template hierarchy exists. See template hierarchy for more details.