Sometimes you want to have a CPT, but not have single post entries for each item, such as a slider, which queries entries to build up an array of items.
In this case, the trick is to set the CPT's value for publicly_queryable
to false
.
E.g.
function awards_custom_post_type()
{
$args = array(
'labels' => array(
'name' => __('Awards'),
'singular_name' => __('Award')
),
'public' => true,
'publicly_queryable' => false
);
register_post_type('award', $args);
}