• I’ve been having a bit of dilemma lately, trying to figure this problem out. I have a need to show the number of entries in a category, but only within the Archives page when a viewer is looking at just one category. The wp_list_cats is too limiting for me, in how it chooses to display the information (ie. it will only display all categories and in this manner: Category (#ofentries) … whereas I need it to display only the category you’re viewing and in this manner: (#ofentries))

    I started a conversation with Justin who developed the excellent Post Count minus Category for WordPress plugin, but because I’m not a programmer, have limited ability to do what he was suggesting, which was:

    i guess there are a couple of ways… the first is that you could just
    have a separate function call for each photography “section” or whatever, but, it seems to me that you are using pages or whatever and so i don’t think that will work.

    couldn’t you just use php to check the uri for any of your categories? for example, have php check https://URL/archives/category/badlands/ for “badlands” and if it finds it in the uri then use the badlands id number as the argument to the function call.

    to give you an idea of what i’m talking about, i use the following line of code to determine whether i’m on my main archives page: <?php if (preg_match ("/archives/i", $_SERVER['REQUEST_URI'])) { ?>

    Does anyone have the interest in helping out a guy with a modified hack or plugin that will display the information correctly? I’ve looked and have seen nothing that will do exactly what it is that I’m looking for, and would have to imagine some others would like this ability too.

    I’m totally up for explaining myself better here, if someone would like me to. I’d just like to know if anyone has the skills and interest to help me out here with an interesting problem …?

Viewing 2 replies - 1 through 2 (of 2 total)
  • So, what you want to do is show the total number of posts in a category only when you select the category to view. Is this correct?

    I think the plugin called wp-pagenavi from GamerZ will do what you want. Please look at my blog just above the Posts for this kind of navigation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show # of entries in Category (NOT wp_list_cats)’ is closed to new replies.