WordPress contains different type of content. It could be a post, page, image and more. These all are different post type in WordPress. These all have a different feature and they independently work.
WordPress have there own default ost Types which is available with default WordPress Installation:
- Post (Post Type: ‘post’)
- Page (Post Type: ‘page’)
- Attachment (Post Type: ‘attachment’)
- Revision (Post Type: ‘revision’)
- Navigation Menu (Post Type: ‘nav_menu_item’)
- Custom CSS (Post Type: ‘custom_css’)
- Changesets (Post Type: ‘customize_changeset’)
Post and Pages are most common single post type in WordPress. For a Better understanding of these post type, let’s take a look in short.
Post – Post in WordPress is a post type is most popular and used by almost blogs to write and share contents.
Page – Pages are great for Managing other parts of contents which can not be shown by default like a post. It could be an about page, a list of members, member area, checkout page and more.
Attachment – Attachment is a special post type which saves your file information in own separate URL.
Revision – Revisions saves your old post, page contents where you can see your old contents and fix the errors and can take a backup from it.
Navigation Menu – Navigation Menu is a type that keeps information about a single item in WordPress nav menu system.
Custom CSS – Custom CSS is a theme specific post used to store CSS saved from The “Appearance” >> Customizer’s “Additional CSS” screen. It saves the CSS in the database this is why you should never store your CSS inline.
Changesets – Changesets is similar to auto-saves but specifically for The Customizer. It keeps your Customizer changes and keeps a backup during the user session in a `customize_changeset` post and attempt to pull them back up even you closed your browser window.
A custom post type can be registered using register_post_type() function in WordPress. You can create our first post type by taking the help from https://generatewp.com/post-type/
Custom Post Types
Generally, a custom post type will look like
1. Videos >> example.com/video/the-first-video
1. Portfolio >> example.com/portfolio/first-portfolio
Here ‘video’ is a post type and archive-video.php will create an archive page for list all the videos and ‘Portfolio’ is 2nd post type and when we create archive-portfolio.php it will create a list of all portfolio items.
For making the custom Post type simple and coding free, Pods, ACF and carbon field are some great plugin to create multiple custom post type in few seconds.
These plugins are easy to use and offer great functionality to your WordPress site.