In an attempt to use the custom post type, after having registered a brand new CPT I have duplicated both the single and the archive pages appending the "-posttype" bit as specified in the register_post_type function.
However, if I try to load a single post or the archive page, both the pages are not loaded. I can't understand where the problem is.
Here is the code I use to register my Custom Post Type
$labels = array(
'name' => _x('Facebook', 'post type general name'),
'singular_name' => _x('Facebook', 'post type singular name'),
'all_items' => __( 'All posts' ),
'add_new' => _x('Add new post', 'Facebook'),
'add_new_item' => __("Add new Facebook post"),
'edit_item' => __("Edit Facebook post"),
'new_item' => __("New Facebook post"),
'view_item' => __("View Facebook posts"),
'search_items' => __("Search in Facebook posts"),
'not_found' => __('No facebook posts found'),
'not_found_in_trash' => __('No facebook posts found in trash'),
'parent_item_colon' => ''
);
//$post_supports = array('title','editor','comments','thumbnail','excerpt');
$post_supports = array('title','editor','thumbnail');
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
//'menu_icon' => get_stylesheet_directory_uri() . '/images/slider.png',
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'supports' => $post_supports
);
Any suggestions to why it is not working?
body_class()
andpost_class()
where appropriate in your Theme, and 2) provide live links so that we can observe the issue?