Want a custom post type, no plugin? WordPress gives you the ability to create custom post types. Want a different type of page than just post, page, or media? Create your own custom post type by following these steps:
Custom Post Type No Plugin
Custom post types give your WordPress Hosting new capabilities for expression.
How To Generate a Custom Post Type Without A Plugin
For this tutorial, you will use the Post Type Generator website to generate your own custom code so you can add it to your site. In order to register your custom post type, you could use the sample code provided, but you should update these options to your specific needs.
- Go to the Post Type Generator
- Fill in the fields for your custom options
- Click Update Code
- Create a file on your computer that ends with a
.phpextension (for example,
- Add the WordPress plugin file header to the very top of the code1
- Put the PHP file in its own folder on your computer
- Compress the entire folder (for example
- Install the zip file on your WordPress site
Now your custom post type is available as a custom plugin. All you need to do is activate it.
Why You Should Use Custom Post Types
All the content you add to WordPress (Posts, Pages, and Media) are all merely different “post types.” This means you can create your own post types. A different post type lets you organize your content more efficiently. For example if you have a blog and you want to start adding recipes to your site, you don’t need to have both blog posts and recipes all listed under “Posts.” You can keep your blog posts under “Posts” and have recipes created under a new “Recipes” post type. Also, if you desire, this lets you customize the page templates for recipes so they display differently than posts.
You can always create custom post types with plugins. (There are plenty of plugins out there that can do this.) But adding more plugins to your site increases your site’s overhead and can leave security doors open to hackers. It’s always better to do your own custom coding. The steps you’ve taken in this article may have required a little more work, but you’ll be glad you have your own custom code.