• <option value=””><?php echo esc_attr( __( ‘Select Month’ ) ); ?></option>
    <?php wp_get_archives( array( ‘type’ => ‘monthly’, ‘format’ => ‘option’, ‘show_post_count’ => 1) ); ?>

    above is my current dropbox (option) code, but show_post_count counts all categories post number, i want to exclude one category in post count, what should i change the code please? thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter boson600

    (@boson600)

    anyone pls help 🙂

    Do you want to exclude just the post count for the category or the category itself?

    Thread Starter boson600

    (@boson600)

    hi, manndtp.
    currently:
    when i select a month then shows all the posts count in all categories (i have 4 cates),but i only want it to show posts count for 3 of the categories,so 1 particular cate i want to exclude, how to do that pls? thank you!

    You might try using the Ultimate Category Excluder plugin. States it allows for excluding categories from your front page, archives, feeds, and search results. I’ve personally never used this plugin before. Never had a need to exclude something 🙂

    Thread Starter boson600

    (@boson600)

    thanks manndtp, but the plugin doesn’t suit my need, works for other purposes though.
    still looking for the solution of show_post_count .

    [Moderator Note: No bumping, thank you.]

    You want to have it show all 4 categories, but just not the count of one category? Something like this:

    Category 1 (post count)
    Category 2 (post count)
    Category 3 (post count)
    Category 4

    Or do you want to hide the entire category 4? So it only shows the first 3.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘how to exclude a category in show_post_count’ is closed to new replies.