/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//CUSTOM POST TYPES DEFINITIONS add_action('init', 'cpt_activites_register', 1); function cpt_activites_register() { 'label' => __('Activités'), 'singular_label' => __('Activité'), '_builtin' => false, 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, //'publicly_queryable' => false, //'exclude_from_search' => true, ); register_post_type( 'activite' , $args ); } add_action('init', 'cpt_restaurants_register', 1); function cpt_restaurants_register() { 'label' => __('Restaurants'), 'singular_label' => __('Restaurant'), '_builtin' => false, 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'publicly_queryable' => false, 'exclude_from_search' => true, ); register_post_type( 'restaurant' , $args ); }