Custom post type in WordPress, what are they and how to create them?

/** Start custom post type */ function cw_post_type_recipes() { $supports = array( ‘title’, // post title ‘editor’, // post content ‘author’, // post author ‘thumbnail ‘, // featured images ‘excerpt’, // excerpt from post ‘custom-fields’, // custom fields ‘comments’, // comments from post ‘revisions’, // revisions from post ‘post-formats ‘, // input formats ); $labels = array( ‘name’ => _x(‘recipes’, ‘plural’), ‘singular_name’ => _x(‘recipe’, ‘singular’), ‘menu_name’ => _x(‘Recipes’, ‘admin menu’), ‘admin_bar_name’ => _x(‘Recipes’, ‘admin bar’), ‘add_new’ => _x(‘Add new’, ‘add new’), ‘add_new_item’ => __(‘Add new recipe ‘), ‘new_item’ => __(‘New Recipes’), ‘edit_item’ => __(‘Edit Recipe’), ‘view_item’ => __(‘View Recipes’), ‘all_items’ => __(‘ All recipes’), ‘search_items’ => __(‘Search recipes’), ‘not_found’ => __(‘No recipes found’), ); $args = array( ‘supports’ => $supports, ‘labels’ => $labels, ‘public’ => true, ‘query_var’ => true, ‘rewrite’ => array(‘slug’ => ‘recipes’ ), ‘has_archive’ => true, ‘hierarchical’ => false, ); register_post_type(‘recipes’, $args); } add_action(‘init’, ‘cw_post_type_recipes’); /** End custom post type */

See also  I can not write in short description of the product in file...
Loading Facebook Comments ...
Loading Disqus Comments ...