When creating custom post types with register_post_type, If you don't want to allow direct access to the post you could try setting public to false and then set query_var to true or your post type which i believe would allow you to still display the links but not allow direct access to the post. I haven't tested this though. I would have just put this in a comment but I don't have enough reputation. http://codex.wordpress.org/Function_Reference/register_post_type
发布评论
评论(2)
使用 register_post_type 创建自定义帖子类型时,如果您不想允许直接访问帖子,您可以尝试将 public 设置为 false,然后将 query_var 设置为 true 或我相信您的帖子类型仍然可以显示链接,但是不允许直接访问该帖子。我还没有测试过这个。我本来想把这个放在评论中,但我没有足够的声誉。 http://codex.wordpress.org/Function_Reference/register_post_type
When creating custom post types with register_post_type, If you don't want to allow direct access to the post you could try setting public to false and then set query_var to true or your post type which i believe would allow you to still display the links but not allow direct access to the post. I haven't tested this though. I would have just put this in a comment but I don't have enough reputation. http://codex.wordpress.org/Function_Reference/register_post_type
不确定您是否必须使用自定义帖子类型。
如果你不这样做。您尝试过帖子格式吗?
http://codex.wordpress.org/Post_Formats
Andrew Nacin 谈帖子格式
Not sure if you must use custom post types.
If you don't. Have you tried post formats?
http://codex.wordpress.org/Post_Formats
Andrew Nacin on post formats