How to Create WordPress Custom Post Types

WordPress has lots of content that is classified into called ‘Post Types’. The default WordPress comes with a single item or standard post and different post types, all stored in its database, found under the wp_posts table. 

Today, here at Visitor Counter Plug-in, we will discuss ways to create WordPress custom post types. Whether you’re managing a site for casino games, tech companies, or personal blogs, you’ll surely find it helpful to create custom post types in WordPress. 

What Are the Custom Post Types in WordPress?

A custom post type is similar to a regular post type; however, there is a different type of post_type value in the database. As you all know, WordPress started as a simple blogging platform and in time turned into a robust Content Management Site (CMS), and the term ‘post’ kind of stuck. Now, even big casino games platforms like Colbet use WordPress for their site. 

The default WordPress contains standard post types such as Page, Post, Attachment, Revision, and Navigation Menu. WordPress turned into a CMS platform, and site owners can now create a custom-type post like Contact Information, Geo locations, add slot machine games, and many more. If you want to create a custom-type post on your WordPress site, here are some ways you can try. 

How to Create a Custom Post Type the Easy Way

So far, the easiest way of creating custom post types in WordPress is with the use of a plug-in. What is a WordPress plug-in? A plug-in is downloaded and installed to a WordPress site to add a new function or improve existing functionality. As such, the Visitor Counter plug-in is installed on a site to count how many visitors visit the site. 

Adding a plug-in is the safest and easiest way to create a custom post type in WordPress. The first step is to install and activate the ‘Custom Post Type UI Plug-in’. Once it is activated, a new menu item will be added by the plug-in on the WordPress admin board called the CPT UI. Follow these steps:

  • Click the CPT UI Menu on the Dashboard
  • Then click Add/Edit Post Types
  • You can change the Basic Settings, add Post Type Slug, add Plural or Singular Label, and Auto-populate labels. You can add ‘Additional Labels’ with Post Type Description, Menu Name, and many more. These labels will be used in all your WordPress site for easier content management. 

Many popular casino games sites use a WordPress plug-in to create custom post types. For example, Colbet uses Visit Counter Plug-in to study visitor behavior to use for their marketing purposes. 

How to Create a Custom Post Type Manually

The downside when using a plug-in to create a custom post type is it may disappear once the plug-in is deactivated. Another option is to create a custom post type manually. To do this, simply add the required code on your WordPress theme’s functions.php file. Examples of manual codes are:

/*

* Creating a function to create our CPT

*/

 

/*

* Creating a function to create our CPT

*/

 

    // Registering your Custom Post Type

    register_post_type( ‘movies’, $args );

 

* /* Hook into the ‘init’ action so that the function

* Containing our post type registration is not 

* unnecessarily executed. 

*/

This option is desirable for coding experts, but we won’t get into further details in the coding part. By creating a custom post type manually, you can also add functionalities just like what adding plug-ins can offer. You can add features like custom fields, support for revisions, featured image,s and many more. 

If you’re a WordPress coding expert, you may prefer the manual coding in creating a custom post. However, when coding is not your forte, you can opt to use plug-ins to create a custom post type. If you’re looking for a visitor counter for your WordPress site to monitor how many visitors you have, install Visitor Counter Plug-in for your website now.