Custom post types and commenting
-
Hello,
I’m using custom post types in my WordPress installation. Works pretty nice, but I have one problem.
When adding ‘comments’ to the register function, the “comments” checkbox appears but is unchecked by default. Is there a way to make this checked?
add_action('init', 'reg_projecten'); // projecten function reg_projecten() { $labels = array( 'name' => _x('Projecten', 'post type general name'), 'singular_name' => _x('Project', 'post type singular name'), 'add_new' => _x('Voeg toe', 'portfolio item'), 'add_new_item' => __('Voeg nieuw project toe'), 'edit_item' => __('Pas project aan'), 'new_item' => __('Nieuwe project'), 'view_item' => __('Bekijk project'), 'search_items' => __("Zoeken naar projecten."), 'not_found' => __('Geen projecten gevonden.'), 'not_found_in_trash' => __('Geen projecten gevonden in de prullenbak.'), 'parent_item_colon' => '' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title','editor','thumbnail','comments'), 'taxonomies' => array('category', 'post_tag') ); register_post_type( 'projecten' , $args ); }
Hoping for help! Thanks
- The topic ‘Custom post types and commenting’ is closed to new replies.