Do you want to create different post types that normal posts or pages?.
If your answer is yes then you can create the custom post type.
There are two ways to create a custom post in WordPress. You can use a WordPress Plugin to create a custom post or you can use the manual method by adding some code to function.php file in the theme directory.
If you are a WordPress Plugin Developer this is method is very important to master.
WordPress support separate template for the custom post types.
When you have custom post, WordPress will go through the template hierarchy and assign the the template which matches first.
If you do not create a separate template for your customer post WordPress uses the single.php
for the custom post type and to display archives, it uses the archive.php
.
If you have created a custom post type name company
then you can have the following templates
single-company.php
– display the single custom post type company
archive-company.php
– display the archive of the post type company
Creating just custom post type in WordPress is not enough to store data. You have to create MetaBox related to the custom post.
If you do not know about the WordPress MetaBox you can read our article on How to create MetaBox