WordPress
December 3, 2020

How to Create Custom Post Type in WordPress

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).

Resource


Related Post


How to Add Excerpts to Your Pages in WordPress

you will need to add the following code to your current themes functions.php file

How to Change the Order of Comment Form Fields in WordPress

If you want to put the comment field after all other fields are loaded. Add the following code in your current themes functions.php file.

How to Load More Post With Ajax in WordPress

Create a load more button to show additional posts or custom post types using AJAX following code in your current theme. 1. Set load more button in your post loop and pass paged parameter in post argument. Load More This will display two post per page. 2. Then you have to add the following code […]

How to Remove Website URL Field from WordPress Comment Form

Use Following Code in your current themes functions.php file it removed website url field from comment form.

how to Upload WordPress Custom Meta Box Image

Hi, here i implement multiple image upload custom fields (WordPress custom meta box image upload ) to page post type if you want it for another post type just change post type name. Add the following code to your current themes function.php file. Go to your pages from WordPress admin and check that multiple image […]

WordPress Login, Register, Change Password And Forgot Password Without Plugin

Are you need simple Login, Register, Change Password, Forgot Password form without plugin for your WordPress website? Yes, Then i have created shortcodes for all forms with simple code. So you can get any form anywhere like in Pages, Posts and Widget etc… Therefore you just need to put shortcodes where you need form. So […]


Leave a Reply

Your email address will not be published. Required fields are marked *