• Ok, this will sound weird I know, but…

    Whenever I click on a category link, I dont want the posts on that category to be listed, but I want the first(or last) post on that category to load on the page.

    Is it something possible with a little hacking, and how can I do it if so?

    Thanks…

Viewing 1 replies (of 1 total)
  • With the help of the Template Hierarchy article, determine what Template is displaying your category archives, then add something like this before your loop:

    <?php
      if ( is_category() ) {
      $args ='&showposts=1';
      query_posts($query_string . $args);
      }
    ?>

    In the WordPress Default theme, that would mean adding that code to wp-content/themes/default/archive.php just before:

    <?php if (have_posts()) : ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Weird Category Listing’ is closed to new replies.