Creating custom Post Type In WordPress

Creating custom Post Type In WordPress

WordPress big advantage while comparing with other CMS is Custom Post type mechanism.
Custom post type allows to create large variety of content.
Lets have a look at how to create a custom post type
Custom post types are available from WordPress 2.9.
Custom post type is nothing more than a regular post.
You could create custom post types for books, movies, reviews, Books and so on.

Creating custom post type

To create custom Post type we have a plenty of plugins but we can achieve this by simple script.
Lets create a custom post type for books.
Below is the script for creating custom post type.


Now lets’s discuss about the parameters
labels
Label Option is an array for different labels for our custom post type
description 

A small explanation about the custom Post type.

public

All to do with Visibiity

menu_positions

To define the position of the custom post type in admin menu.

supports

to get default WordPress controls in edit sections

has_archive

To create the URL rewrite