In a theme I'm building, I have this structure for detecting what type of page something is. However, if I visit mydomain.com/category/ or mydomain.com/tag/, all I get is the "nothing found" message I have in the have_posts()'s else statement. Is there a way to detect when these links are visited and display something other than what's in the final else statement?
if(is_category()):
echo '<h1>title here</h1>';
elseif(is_tag()):
echo '<h1>title here</h1>';
elseif(is_author():
echo '<h1>title here</h1>';
elseif(is_archive()):
echo '<h1>title here</h1>';
endif;
if(have_posts()):
//the loop
else:
echo '<h1>Nothing Found</h1>';
endif;