Downsides to not using built-in “Posts” post type?

I plan on skipping the Posts post type once and for all. This is a brand new portal. It will have 100s of thousands of content in the form of articles, multimedia, and links. Instead of Posts, I will be using a custom post type called “Articles.” Similarly, for my video, audio, and picture posts, I will be using another CPT called “Multimedia.”

I’m doing this to bring a one standard across all actions that is anytime we post anything, that’s a CPT. That helps me deal with urls, Admin UI, who has control over what, what taxonomies to show when, and all that.

Two questions:

  1. how do you get rid of the post menu on the admin ui?
  2. any issues of skipping the post type and not using it at all?

3 Answers
3

1. how do you get rid of the post menu on the admin ui?

Simple, just un-register the post post type. There isn’t a default function to do this, but one of the core developers (Nacin) posted some sample code on a WP Trac ticket showing how it can be done:

if ( ! function_exists( 'unregister_post_type' ) ) :
function unregister_post_type( $post_type ) {
    global $wp_post_types;
    if ( isset( $wp_post_types[ $post_type ] ) ) {
        unset( $wp_post_types[ $post_type ] );
        return true;
    }
    return false;
}
endif;

2. any issues of skipping the post type and not using it at all?

Be forewarned that unregistering default post types is not recommended. Just because you can do something doesn’t mean you should. My best recommendation would be to use the default posts as your articles in the first place.

Remember, posts and pages are registered just as any other CPT would be. So deregistering posts just to register articles is akin to reinventing the wheel.

Leave a Comment