How to Create Custom Post Type in WordPress

How to Create Custom Post Type in WordPress
92 Views

Custom post types are same like posts and pages. By default WordPress comes with a few different post types which are all stored in the database under the wp_posts table.

Default Post Types

  • Posts
  • Pages
  • Attachments
  • Revisions
  • Navigation Menus
  • Custom CSS
  • Changesets

We can create your own custom post types and call them whatever we want. On below example we register a post type ‘events’ with an array of arguments. These arguments are the options of our custom post type. Code goes in function.php file of your active child theme (or active theme).

Was this article helpful?
YesNo

1 comment

  1. Wow, marvelous blog layout! How long have you been blogging for?
    you make blogging look easy. The overall look of your site is
    magnificent, as well as the content!

Leave a comment

Your email address will not be published.