WordPress.org

Ready to get started?Download WordPress

Forums

Need help numbering archive results (2 posts)

  1. shiningpathos
    Member
    Posted 10 months ago #

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

    http://d.pr/i/LhdC

    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!

  2. shiningpathos
    Member
    Posted 9 months ago #

    Anyone know how to do this?

Reply

You must log in to post.

About this Topic