Wordpress provides different templates to manage the website like comment.php is useful to manage the comment box. We are going to discuss these different templates which are useful in theme development.
Suppose we want to show the specific category and category slug is expert and category id is 3. When we access the category link then it will access the file named category-export.php. If this file does not exist then we will try to access the category-3.php. If this file also does not exist then it will access the file category.php and if file does not exist then it will access the archive.php. and if this file also does not exist then it will access the index.php.
We are going to display different templates and these sequences. Please have a look.
-
1) Archivepage
-
1.1) Author archive
author-$nicename.php -> author-$id.php -> author.php -> archive.php -> index.php
-
1.2) category archive
category-$slug.php -> category-$id.php -> category.php -> archive.php -> index.php
-
1.3) Custom post type archive
archieve-$post-type.php->archive.php -> index.php
-
1.4) Custom Taxonomy archive
taxonomy-$taxonomy-term.php -> taxonomy-$taxonomy.php -> taxonomy.php -> archive.php -> index.php
-
1.6) Data archive
date.php -> archive.php -> index.php
-
1.7) Tag archive
tag-$slug.php -> tag-$id.php -> tag.php -> archive.php -> index.php
0 Comment(s)