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
版权声明:本文标题:php - Why is my custom post content only viewable when signed into Wordpress? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741210045a2358931.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论