The WordPress content management system provides the ability to publish content based on many types of posts, which speeds up and makes it easier for the content publisher to include what he wants within the post in order to reduce the time and effort that is wasted in reorganizing the methods for inserting content every time something is published.
But one of the most important features of WordPress is not only the presence of many types of posts, but also the ability to create custom types of them according to the characteristics that we want and need to develop publishing methods on the site. If none of the default types of posts provide the ability to publish and organize information easily and smoothly on the site, Custom posts and other custom content add-ons can be created that perform this function.
Here we will introduce you to custom posts, and we will highlight some of the times when using this type of posts is useful. We will also explain in a practical and illustrated way the ways to create and use it in WordPress. We will also explain how to create custom categories that you may need to use in… sometimes.
Default post types and custom post type concept
It is easier to explain and simplify the concept of custom posts or custom posts after seeing and understanding the default post types in WordPress. Post types are different ways to organize content in a website powered by WordPress.
Default post types in WordPress
The WordPress system comes with 7 types of pre-prepared posts, each of which has distinct characteristics that make it suitable for publishing the type of content it is prepared to publish. For example, (articles) come with an option that allows you to classify them into categories and tags to make them more organized and easier for visitors to describe, while This option is not available in Pages because it is better not to organize them this way by virtue of the task for which they were created.
The most common default post types in WordPress include:
- Articles ( Posts ): A group of posts to which items are added on an ongoing basis. Categories and tags can be added to each article, and they are displayed on the archive pages.
- Pages : Types of posts used to publish content that is likely not changed frequently, and are not organized with categories and tags or displayed on archive pages .
- Attachments : These are data related to the media elements that you upload to your site, such as metadata such as title, description, alternative text, and others .
- Navigation menu items : Navigation menu items are stored in the database, and WordPress knows through metadata that this post is an item in the navigation menu and shows it in its designated place.
- Revisions : These are copies of posts that WordPress saves when you make a new save for any type of post, including posts and pages.
There are also two other types of post types in WordPress, one of which is known as (custom CSS) and the second is known as (changes), but you may not have heard of them previously, and it is not necessary to know them to understand a custom post.
Read also: The difference between posts and pages in WordPress
What is a custom post?
A custom post is a post type that you create when you need another post type that is different from the post types that exist by default in WordPress. A custom post can have different custom properties, and other custom classifications that are different from the post type classifications (articles).
Basically, custom posts and other custom content elements associated with them help group your posts more specifically and organized, especially if your site is interested in more than one general content (books and TV shows, for example), as the organization of posts in this case will not be good if you use the type Post (Articles) for both books and TV shows, but it is better to use a custom post type called (Books) for books, and a custom post type called (TV Shows) for TV shows.
Custom posts are also useful in many other cases, some of which we will highlight in the following paragraph. The custom post that is created in WordPress appears as a separate item in the WordPress control panel menu , and each type of custom post has a special tab. with it.
When do you need to create a custom post?
You will need to create and use a custom post when you want to add content to the site that cannot be added well using one of the pre-existing post types in the system. The most common and common cases in which custom posts are used include the following:
- When you need to add products to e-commerce sites.
- If you want to add an item to a project portfolio website.
- If you want to insert a map into a maps site.
You can definitely be sure you need to use a custom post if you are in one of the following situations, and none of the default posts can help you:
- It wasn’t helpful to use labels and tags to organize content.
- You will need additional fields to enter more information to accompany the added content.
- You need to display content differently than posts and pages.
- Posts you add don’t need to be arranged in reverse chronological order.
There are also many other circumstances in which using a custom post is better than using articles, pages, or other types of default posts, and a site manager can often know that he needs to create a custom post and use it on his website.
How to create a custom post in WordPress
There are many methods that can be used to create custom posts and other custom elements that may be associated with them, but we will not explain all of them here. Rather, we will only explain the easiest way to accomplish the task, which relies on the secure plugin Custom Post Type UI that can be installed and activated for free on WordPress from Through the system control panel based on the instructions we explained in the article ( How to install a WordPress plugin and activate it on your site correctly ).
To create a custom post on your WordPress site, install and activate the plugin that we mentioned above, then go to the page for creating a new custom post by clicking on the (Add/Edit Post Types) button that is located in the drop-down list that appears when you place the mouse cursor on The new option (CPT UI) added by the plugin in the side menu of the WordPress dashboard.
You will be asked to provide several necessary information on the custom post creation page, such as an appropriate English name to be part of the custom post type link, the singular and plural of the custom post name you want to create, and many other naming information and customization options.
In fact, there are many fields that must be filled out, but if you use the English language on your site, you can fill out most of the label fields automatically by clicking on the (Populate additional labels based on chosen labels) button located within the (basic settings) section. If If you are using the Arabic language, you will have to fill out all the fields manually if you want them to appear correctly in various parts of your WordPress.
It is worth noting the need to ensure that the options in the (Settings) section on the custom post creation page are set as you want.
These options are many as they provide you with wide customization options. You can read the description attached to the option to find out what it does (the description is in English, but you can use Google Translate to translate it into Arabic).
Under the Settings section on the Create a Custom Post Type page, you will find an option through which you can select the editing features that you want the custom post type you are creating to support. You can select the features you want by placing check marks in the boxes next to the editing features listed under each other. .
You will also find at the end of the ( Settings ) section on the page for creating a custom post type an option that allows you to specify the categories that the post type will support by placing a check mark next to the type of classification that you want the post type to support.
Here you’ll find various types of labels, including the default ones (categories and tags), as well as custom ones you’ve created using the plugin itself (we’ll explain how to do that later).
After you have completed filling out all the required fields, and specifying all the settings as you want to customize the custom post type exactly as you want, you can click on the ( Add Post Type ) button located at the bottom in order to carry out the process of creating the custom post and adding it to your WordPress system.
After clicking the button, you will notice that the name of the custom post type is listed in the side menu of your WordPress system similar to other post types, and you can use it in a similar way to using those post types, but based on the options you selected on the custom post creation page.
Create a custom category in WordPress
In addition to the ability to create a custom post type, the Custom Post Type UI provides users with the ability to easily create custom categories in a similar way to creating custom posts.
To create a custom taxonomy (Taxonomies) in WordPress, go to the (Add/Edit Taxonomies) page by placing the mouse cursor on the (CPT UI) option and then clicking on the (Add/Edit Taxonomies) option from the drop-down menu that appears.
After that, you must fill in the fields on the page and choose what you want from the available options. These are, just like the fields and options of the custom post creation page, that specify the various names of the classification, in addition to many settings related to it. Of course, you will find accompanied by each field and option a description that informs you of what it defines or does. With it, some fields can also be filled in automatically to save time if you use the English language in your WordPress.
An important option on the new custom classification creation page is the ( Attach to Post Type ) option through which you can specify to which types of posts the classification you create will be added.
All post types to which custom labels can be added, including default and custom, are displayed here.
After you finish filling out the fields and specifying the options according to what you want on the custom taxonomy creation page, you can click on the ( Add Taxonomy ) button to create the taxonomy on your WordPress site, and add it to the posts you have selected.
Modify custom post or custom classification options
The Custom Post Type UI plugin provides the ability to modify custom posts and custom categories created in WordPress. If you need to, you can go to the editing page by placing the mouse cursor on the (CPT UI) option located in the side menu, then clicking on the (Add/Edit) option. Post Types) or (Add/Edit Taxonomies) depending on what you want to modify (is it a custom post or a custom taxonomy).
After that, you will have to go to the Edit tab by clicking on the name of the Edit Post Types tab (or Edit Taxonomies for the custom classification), then you will have to choose the custom post or custom classification that you want to modify from the drop-down list if it is not the option chosen by default in order to be transferred. To its edit page.
The editing page will look similar to the creation page, as it includes the same fields and options. You can modify any of the options and information, knowing that it is not recommended to modify some of them except in special cases, such as the first field that is part of the custom post type link or custom classification, i.e. Post Type Slug. Or Taxonomy Slug.
After you finish modifying all the information and options you want, do not forget to click on the save button at the bottom of the page (Save Post Type for the custom post and Save Taxonomy for the custom classification).
It is also worth noting that a custom post or a pre-existing custom design can be deleted by clicking on the delete button (Delete Post Type or Delete Taxonomy) located on the edit page. It is also possible to review the posts or categories currently added to WordPress and information related to them by clicking On View Post Types or View Taxonomies on the Edit Custom Posts or Categories page.
And here, dear reader, we have finished introducing you to the concept of the custom post and when it is useful to use it, in addition to the method of creating it in WordPress based on the Custom Post Type UI add-on specialized in implementing this task. In conclusion, we point out that there are other methods that can be used to add custom posts. However, this method that we explained is the easiest and best for the WordPress user who does not prefer to use codes to implement tasks on his website.
Leave a Reply