Generally, premium WordPress themes are bundled with custom post types like portfolios, reviews, testimonials, teams, etc. However, as a user, you might not be using them at all, eventually slowing down your website.

If you need to remove a custom post type you do not want to use anymore, use the following lines of code. WordPress will automatically unregister that particular post type from your admin dashboard.

if( !function_exists( 'bluewindlab_unregister_post_type' ) ) {
    function bluewindlab_unregister_post_type(){
        unregister_post_type( 'portfolio' );
    }
}
add_action('init','bluewindlab_unregister_post_type');

Leave a Comment

Your email address will not be published.

*
*

Back To Top