Creating Custom Post Types by PHP code
There are two methods by which we can use to create our own custom post types: 1. By Using Plugins 2. By Using hard code into your theme’s functions.php file. "Custom Post Type UI" is a nice plugin that allows you to easily create custom post types as well as taxonomies. This also provides PHP code to create custom post types, so you can use it into your theme’s functions.php file. If you want to use custom post types without a plugin, then just add the following PHP code to your functions.php file: // Creating Videos a Custom Post Type register_post_type('videos', array( 'label' => 'Videos', 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => 'videos'), 'query_var' => true, 'supports' => array( 'title', 'editor',…