• Hi,

    At this time, the category that contains private messages is not shown in the sidebar. Even when users are logged in, the category isn’t shown.

    Is it possible to show the category (even when there are only private posts in it) in the sidebar (when a user is logged in)?

    Kind regards,

    Inez

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    By default the widget hides categories that are not assigned to published posts. Published, private posts with such categories are treated as unassigned. The arguments used to list categories can be altered to cause all categories be output, assigned or not. Depending on whether you are using the dropdown list or the regular list, use the filter “widget_categories_dropdown_args” or “widget_categories_args” to add a 'hide_empty' => false, element to the passed arguments array.

    You can add conditional logic to your filter callback which only adds the argument when the current user is logged in.

Viewing 1 replies (of 1 total)
  • The topic ‘Private posts not shown in category sidebar’ is closed to new replies.