How To Create Custom WordPress Post Types Function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
add_action('init', 'portfolio_register'); function portfolio_register() { $args = array( 'label' => __('Portfolio'), 'singular_label' => __('Project'), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => 'POST-TYPE-SLUG-HERE'), 'supports' => array('title', 'editor', 'thumbnail') ); register_post_type( 'custom-post-type' , $args ); } |