Forums

[resolved] wp_list_cat: optioncount = 0 ??? (6 posts)

  1. leeloo5e
    Member
    Posted 3 years ago #

    Having some categories and showing them in the sidbar template with the widget feature. Also I try to show the category list like

    <?php wp_list_cats('sort_column=name&amp;optioncount=1&amp;hierarchical=0'); ?>

    Behind every category the number of posts in this category is set to display. At one category the number is shown as Zero (0) but looking at the admin panel and going to the category there are 33 posts in this category. All other post counts are correct in the sidebar.

    Any suggestions?
    Thanks.
    Best Regards,
    Leeloo5E

  2. MichaelH
    Volunteer
    Posted 3 years ago #

    Might try the template tag, wp_list_categories(), and the show_count=` argument. wp_list_cats is deprecated.

    Also, might edit one of the posts in that category and see if it corrects itself.

  3. leeloo5e
    Member
    Posted 3 years ago #

    still the same using wp_list_categories():

    <?php wp_list_categories('orderby=name&amp;show_count=1'); ?>

    also saving some posts of this category again, does not have any effect. the category is still shown with zero posts but have 33!

    What else can be done?

    Thanks,
    Best Regards,
    Leeloo5E

  4. MichaelH
    Volunteer
    Posted 3 years ago #

    Then guessing there's a plugin causing your problem.

  5. leeloo5e
    Member
    Posted 3 years ago #

    Yes, this might be. Using the plugin "Social Access Control". When nobody is logged in, all categories post counts are different from the real one. Have to ask the developer of this plugin, i think.

  6. MichaelH
    Volunteer
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic