Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

To add a Post Format selector in WordPress, enable the formats in your active theme with add_theme_support(). Then add post-formats support to any page or custom post type that should use the selector, and create template logic for displaying each selected format. The selector stores a format slug; it does not automatically redesign the post content.

1. Enable the selector in the active theme

WordPress only displays the Post Format control when the active theme declares support. Add this code to the theme’s functions.php file or an equivalent theme setup file:

function mytheme_setup() {
    add_theme_support( 'post-formats', array(
        'aside', 'gallery', 'image', 'link', 'quote',
        'status', 'video', 'audio', 'chat',
    ) );
}
add_action( 'after_setup_theme', 'mytheme_setup' );

after_setup_theme is the appropriate hook for theme support. Use only WordPress’s standardized format slugs; invented values will not create valid formats.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Available format slugs

Slug Typical use
aside A short note without a full article structure
gallery A post centered on a collection of images
image A post focused on one image
link A post whose main purpose is sharing a link
quote A quotation or citation
status A brief status update
video Video-led content
audio Audio-led content
chat A conversation or transcript
standard No special format selected; WordPress represents this as the default state

After the theme is active and the code runs, the post editor exposes the format selector or meta box for supported post types. The exact position depends on the editor and theme.

2. Add post formats to pages or custom post types

Regular blog posts are the usual target. Pages and custom post types need their own support declaration.

Add support after registration

Use the init hook when the post type already exists:

function mytheme_cpt_formats() {
    add_post_type_support( 'page', 'post-formats' );
    add_post_type_support( 'book', 'post-formats' );
}
add_action( 'init', 'mytheme_cpt_formats' );

Replace book with the registered post-type key. The post type must exist before add_post_type_support() runs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Declare support while registering the post type

If you control the registration code, include post-formats in the supports array:

register_post_type( 'book', array(
    'public'   => true,
    'show_ui'  => true,
    'supports' => array( 'title', 'editor', 'post-formats' ),
) );

show_ui controls whether WordPress generates the administrative interface for managing that post type. A post type can support formats in code yet still provide no usable editor screen if its admin UI is disabled.

3. What the editor control actually does

When both the active theme and the post type support formats, choose a format in the editor’s Post Format control (often shown in the Publish or post settings area). WordPress saves the selected standardized slug with the post.

The selection is metadata for presentation. It does not extract a video, convert text into a quote, rearrange blocks, or otherwise transform the body. Your theme must decide what each format looks like and which fields it emphasizes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Render a different template for each format

Use the conditional APIs inside the loop or a single-post template. This example routes video and quote posts to dedicated template parts and falls back to the selected format or the standard layout:

if ( has_post_format( 'video' ) ) {
    get_template_part( 'template-parts/content', 'video' );
} elseif ( has_post_format( 'quote' ) ) {
    get_template_part( 'template-parts/content', 'quote' );
} else {
    get_template_part(
        'template-parts/content',
        get_post_format() ?: 'standard'
    );
}

Create matching files such as template-parts/content-video.php, template-parts/content-quote.php, and template-parts/content-standard.php. Keep escaping, permissions, and normal WordPress loop functions in those files as you would for any other template.

Use the selected slug directly

get_post_format( $post_id ) returns the selected format slug. For the default format it returns false, so provide a fallback when constructing a template-part name or class.

$format = get_post_format( get_the_ID() );
$format = $format ?: 'standard';
get_template_part( 'template-parts/content', $format );

Style formats with post classes

Call post_class() on the post’s outer element. WordPress adds classes such as format-video, letting CSS target a format without duplicating every template branch:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<article <?php post_class(); ?>>
    <?php the_title( '<h2>', '</h2>' ); ?>
    <div class="entry-content">
        <?php the_content(); ?>
    </div>
</article>

You can combine format-specific template parts with these classes: templates handle structural differences, while CSS handles spacing, typography, and visual treatment.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

5. Why the Post Format box is missing

  • The active theme does not declare support. Confirm that add_theme_support( 'post-formats', ... ) runs in the active theme and is attached to after_setup_theme.
  • The post type lacks support. Add post-formats to its registration supports array or call add_post_type_support() after registration.
  • The post type has no admin UI. Check that its registration sets show_ui to true if you expect an editor screen.
  • The format list is invalid. Check every value against WordPress’s standardized slugs; custom names do not create additional formats.
  • The code is running at the wrong time. Theme support belongs on after_setup_theme; post-type support should run on init or be declared during registration.
  • You are editing a different post type or theme. Verify the active theme and the post type assigned to the editor screen before changing code.

6. Plan the presentation before enabling formats

Adding the selector is only useful when the theme has a clear visual and content treatment for each choice.

Decision What to define
Scope Whether formats apply to built-in posts, pages, custom post types, or several of them
Registration timing after_setup_theme for theme support and init for post-type support
Presentation method Conditional template parts, post_class() selectors, or both
Content expectations Which fields and layout each format needs, such as media for video/audio or attribution for quotes

Enable only the formats your templates can present coherently. A long list of choices with identical output makes the control confusing for authors and readers.

7. A complete implementation checklist

  1. Add the standardized format list with add_theme_support() on after_setup_theme.
  2. Confirm the intended post type supports post-formats, either during registration or on init.
  3. Ensure a custom post type has show_ui => true when it needs an admin editor.
  4. Open the editor and verify that the Post Format control appears.
  5. Save a post with a non-default format and confirm that the value persists after reloading.
  6. Create the corresponding template parts and route to them with has_post_format() or get_post_format().
  7. Add post_class() and format-specific CSS where structural templates are unnecessary.
  8. Test every enabled format on archive and single views, including the default format.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.