What are custom post types and how to use them
Just as diverse as the WordPress platform is, there are different custom post types that you can use to meet your content needs. Each of the types can allow you to create a special post for content such as a testimonial, locations or even job postings. To help you learn more about how to use custom post types, keep reading to learn more.
What are the basic post types
Currently. WordPress has five basic post types available, and each functions differently. The five post types are:
- Navigation menu
Post – Post is the most used of all of the custom post types because this is where most blogs and articles are written. It can be accessed by going to Post > Add New from your WordPress Dashboard. Posts are displayed on the user-facing end of your site by date with the newest post shown first. Categories and tags can be used to organize your post.
Page – A Page and Post are similar custom post types but serve a different function. Pages are often used to add an About or Contact section to your website. However, how you decide to use Pages is up to you. One of the things that distinguish a Page from a Post is that you are able to use different page templates. You can also you a hierarchical structure with pages to make them the parent of other pages. You can create a Page by going to Pages > Add New from your WordPress Dashboard.
Attachment – Attachment is special custom post types that primarily stores information about a file uploaded to your website. Information that is stored on an attachment includes: a description, name, metadata, size of the images, thumbnails generated from images, the location of the image files, the HTML alt text, and EXIF data embedded in the images.
Revision – Revisions is also a special custom post type, which can be found on pages and post. Revisions are auto-saved edits to Pages and Post. It can be used to compare past revisions of a published post.
Navigation Menu- Navigation Menu is the final custom post type. It is the simplest type to understand because it essentially are menus that help users navigate your website. Menus are auto-generated using pages, but you can create and edit your navigation menu by going to Appearance > Menus from your Dashboard.
One of the benefits of using WordPress to run your site is that it allows you to expand significantly on its most basic features, including the five basic post types. The basic post types can be expanded to include custom post types, which allow you to create custom taxonomies for the content on your site.
For example, you can set up custom post types to distinguish your products from other content on your site. It is best to use a plugin to create the custom types, but you can implement custom post types by editing the functions.php file on the server that hosts your WordPress site.
How to use custom post types
Now that you know more about the basic post types, let's take a look at what a custom post type is and how to use it. A custom post type is the creation of a new post type that's not part of the basic post type list shared above. It allows you to define a new post type by its labels, supported features, availability and other specifications.
This is an advanced feature that uses the
register_post_type() function to create it. However, there are also plugins that can help you create customer posts. The one plugin that I highly recommend is Advanced Custom Fields. According to their website, you can “take full control of your edit screens & custom field data”. Which means that once you master this plugin that you can customize the look and feel of your post types for your website content creators.