The Complete guide to create custom post in wordpress

In this article, I am going to explain “How to create custom post in WordPress” In WordPress we can create custom post type different ways  . There are two ways Ideally you should create a plugin when working with custom post types, but if you don’t know how to create plugin, or just need a quick test, you can use the functions.php file in your theme.


 

Labels

Labels is an array which defines the different labels that a custom post can have like name,singular_name,add_new,add_new_item etc.

Description

Description is a short description of post type which defines the about post type.

Menu_position

Menu position defines the position of menu in Admin panel. If setting it 5 it displayed after default post.

has_archieve

If set to true has_archieve, rewrite rules will be created for that post type, enabling a post type archive at http://mysite.com/posttype/ (by default)

 

5 Comments

Add a Comment

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