Support » Fixing WordPress » Need help numbering archive results

  • I am trying to code a category archive page to look like this –

    The first thing I’m unsure of is how to get the count for the ‘(3) results’ at the top of the page. The code I’m currently using only allows the total count of all posts, rather than just that category –

    <?php $cat = $category->cat_ID; $allsearch = &new WP_Query(array('showposts' => '-1', 'category' => $cat)); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; echo $key; echo $count . ''; wp_reset_query(); ?>

    The second thing is that using an ordered list doesn’t let me results as you see them in the mockup. I’m looking for some other post_count code that would let me display the number beside each result. Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Need help numbering archive results’ is closed to new replies.