- Attended a Community Meetup
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 1 and 9 items
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 4-5 years
- Item was Featured
I no longer include the “archive.php” file in my themes because I have “date.php”, “category.php”, “author.php” and “tag.php” to handle the requests. What I’m wondering is, can you directly target the “archive.php” file or return a TRUE value for the “is_archive()” function that does not go through one of these other files?
The WP Codex states:
Function Reference/is archive
This Conditional Tag checks if any type of Archive page is being displayed. An Archive is a Category, Tag, Author or a Date based pages. This is a boolean function, meaning it returns either TRUE or FALSE .
http://codex.wordpress.org/Function_Reference/is_archive
To me that means “archive.php” is a catchall for these other queries, but when you look at the diagram for template hierarchy it shows a separate branch for “is_archive”
http://codex.wordpress.org/File:Template_Hierarchy.pngAm I missing something? Is there a way to directly target this file with a WordPress query?
Parallelus saidhttp://codex.wordpress.org/Function_Reference/is_author http://codex.wordpress.org/Function_Reference/is_category http://codex.wordpress.org/Function_Reference/is_date http://codex.wordpress.org/Function_Reference/is_tag
I no longer include the “archive.php” file in my themes because I have “date.php”, “category.php”, “author.php” and “tag.php” to handle the requests. What I’m wondering is, can you directly target the “archive.php” file or return a TRUE value for the “is_archive()” function that does not go through one of these other files?The WP Codex states:
Function Reference/is archive
This Conditional Tag checks if any type of Archive page is being displayed. An Archive is a Category, Tag, Author or a Date based pages. This is a boolean function, meaning it returns either TRUE or FALSE .
http://codex.wordpress.org/Function_Reference/is_archiveTo me that means “archive.php” is a catchall for these other queries, but when you look at the diagram for template hierarchy it shows a separate branch for “is_archive”
http://codex.wordpress.org/File:Template_Hierarchy.png Am I missing something? Is there a way to directly target this file with a WordPress query?
EDIT : I think thats what your getting at right?
