Ready to get started?Download WordPress


Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/enable post format ui


The enable_post_format_ui filter allows developers and themers to turn off the post format UI on the new post page of wp-admin.


When the 'enable_post_format_ui' filter is called, it is passed two parameters:

  • $enabled - Boolean value to show post format UI
  • $post - WP_Post object related to current post
add_filter( 'enable_post_format_ui', 'filter_function_name', 10, 2 );

function filter_function_name( $enabled, $post) {
    return $enabled;

Where 'filter_function_name' is the function WordPress should call when filter is run. Note that the filter function must return an value after it is finished processing or the result will be empty.

filter_function_name should be unique function name. It cannot match any other function name already declared.


Remove post format UI

add_filter( 'enable_post_format_ui', '__return_false', 10, 2 );

Change Log

See Also