Hi,

Many wordpress users wants to display Category Pages instead of Post titles. For that you need to perform these steps:

1) Open archive.php file of your theme.
2) Remove the code between the loops.

Loop starts at:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

Loop End:
<?php endif; ?>

3) Add this code between the  loop:
<?php $temp_category = single_cat_title(”,false); if (!empty($temp_category)){ //
give index ?>
<h1><?php single_cat_title(); ?></h1>
<p><?php echo(category_description(the_category_ID(false))); ?></p>
<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
<li><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></li><br>
<?php endforeach; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
<?php endif; ?>
<?php }else{ // give details or single post ?>
…… code for normal post overview
<?php } ?>

4) Save and upload the file again on the server.

That’s it!

Thanks,

Shane G.

Popularity: 1%

Related posts:
  1. How To Display Adsense On First Post Within IN Loop Of Wordpress Hi, Many wordpress users wants to display Adsense on first...
  2. How To Make Search Result Unlimited In Wordpress Blog Hi, Sometimes wordpress users want make the search results unlimited....
  3. How To Display Post Alphabetically In Wordpress Blog? Hi, WordPress organizes and displays posts in descending chronological order:...
  4. How To Add Author Page in Wordpress Blog Hi, In order to create an author page you will...
  5. How To Set Different Style For Latest Post In Wordpress Hi, You can find many blogs which has assigned special...

Leave a Reply

You must be logged in to post a comment.