In WordPress, it supports numberous post formats on when you write a blog post. In default, it sets the post format as standard. If you didn’t use them at all and want to disable the post format. You can disable them through child theme.
Here is the list of post formats of WordPress:
- aside
- gallery
- link
- image
- quote
- standard (Default)
- status
- video
- audio
To disable the entire post formats on your site. You can place this code into your function.php
at child theme
.
function jorcus_remove_post_formats() {
remove_theme_support('post-formats');
}
add_action( 'after_setup_theme', 'jorcus_remove_post_formats', 11 );
If you’d like to only support some specific post formats, you can use add_theme_support()
to tell which post formats you want it to support on your site. At here, I want to disable all post formats and only enable it to support aside
and gallery
post format. Here’s the implementation code sample.
function jorcus_remove_specific_post_formats() {
add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );
}
add_action( 'after_setup_theme', 'jorcus_remove_specific_post_formats', 11 );
If you need your side to support more post format, just add the post formats at the array()
.