0

I'm using wp_dropdown_categories in the restrict_manage_posts hook to build a filter for the various post_formats.

It works correctly, but it seems to only be counting published posts, and won't count any posts which are draft.

function _restrict_manage_posts_format()
{
    wp_dropdown_categories( array(
         'taxonomy'         => 'post_format',
         'hide_empty'       => 1,
         'show_count'       => 1,
         'name'             => 'p_format',
         'show_option_none' => 'All Formats',
         'selected'         => $post_format_ID
    ) );
}
add_action( 'restrict_manage_posts', '_restrict_manage_posts_format' );

Is there a better way to render the list that will match the count of posts being returned for each format?

New contributor
Braineack is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Braineack is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.