admin管理员组

文章数量:1278721

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' );

本文标签: phpWhy is my custom post content only viewable when signed into Wordpress