• Hi,

    I am using WP Hide Post to hide some posts from my blog (it’s working great), and I set a Tag called Hidden also. My problem is that the Category Widget counts these posts for the post’s category. Eg. my category is “Behind the Scenes”, there are 6 public and 2 hidden posts, but the count shows 8 instead of 6.

    Is there any way to exlude these posts from the count? I know the way how to exclude a complete category from the widget, but that is not what I am looking for.

    Thanks,
    Zoltan

Viewing 2 replies - 1 through 2 (of 2 total)
  • You would need to modify the Category widget to look at the tags (tags and categories are two different things).

    You might look for a category widget that would do what you want.

    Thread Starter raptor002z

    (@raptor002z)

    I’ve found the following functions and hooks

    wp_list_categories() / widget_categories_args
    get_categories() / get_categories_taxonomy
    get_terms() / get_terms_args / get_terms / list_terms_exclusions

    but after this I realised that the base “term_taxonomy” table (this is what the get_terms() funcion is using) has got a dedicated count field… so the Category Widget “show count” feature is not “on the fly” working, just shows the already counted value…

    Does anybody knows about any 3rd party Category Widget with category and tag exclude features? ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exlude posts with "Hidden" Tag from Category Widget Count?’ is closed to new replies.