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?

  • Still unable to find a solution for this... – Braineack Apr 30 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.