test if WP is displaying with index.php file
-
Is there some way to test if the WP app is using the index.php file for displaying content? I know I can say
if (is_category())
or
if (is_page())
etc…
but as far as I know, there is no
if (is_index())
I know that when no posts exists, WP does not use the category.php file… it uses index.php
1) can I force it to somehow use category.php anyway?
2) if not, can I test whether the index file is being used so that I can conditionally display something in the sidebar?Your help appreciated!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘test if WP is displaying with index.php file’ is closed to new replies.