Site icon Hip-Hop Website Design and Development

Why is my custom post content only viewable when signed into WordPress?

I’ve created a custom Post type called ‘Data’ to display content on a WordPress site. The content works and is displayed if viewed when signed into WordPress. Howevever, if you view the same URL when not signed into WordPress (Incognito), the page appears blank. Is there a soultion to this?

Snippet from functions.php:

// Our custom post type function

function create_posttype() {

register_post_type( 'Data',
// CPT Options
    array(
        'labels' => array(
            'name' => __( 'Data' ),
            'singluar_name' => 'Data',
        ),
        'public' => true,
        'has_archive' => true,
        'rewrite' => array('with_front' => false, 'slug' => 'data'),
        'support' => array('title', 'editor'),
        'publicly_queryable' => true

    )
);

}
// Hooking up our function to theme setup
add_action( ‘init’, ‘create_posttype’ );