what’s wrong with the Permalink Category
-
use the Permalink
category
https://drivers-download-center.org/drivers-download-cdrom-readers/the category has posts:
https://drivers-download-center.org/drivers-download-cdrom-readers/io-magic-2/the category no posts:
https://drivers-download-center.org/drivers-download-cdrom-readers/acer-3/if the category did not have posts,it will be show with the index.php not use the archive.php
in the index.php
<?php if (have_posts()) : ?>
….
<?php else : ?><?php
//here ,i add some code if the category did not have posts
?><?php /* If this is a category archive */ if (is_category()) { ?>
<h1 class=”pagetitle”>Not Found <?php single_cat_title(); ?></h1>
<?php }else{ ?>
<div class=”entry”>
<h2>Not Found</h2>
Sorry, but you are looking for something that isn’t here.
</div>
<?php } ?><?php endif; ?>
if did not use the Permalink
if the category did not have posts it will be show in the archive.php
- The topic ‘what’s wrong with the Permalink Category’ is closed to new replies.