use*_*101 2 wordpress permalinks custom-post-type posts
我想隐藏Wordpress中特定帖子类型的帖子标题下的永久链接部分.我怎样才能做到这一点?
Rit*_*gar 10
在下register_post_types添加以下参数:
'public' => false, // it's not public, it shouldn't have it's own permalink, and so on
'publicly_queryable' => true, // you should be able to query it
'show_ui' => true, // you should be able to edit it in wp-admin
'exclude_from_search' => true, // you should exclude it from search results
'show_in_nav_menus' => false, // you shouldn't be able to add it to menus
'has_archive' => false, // it shouldn't have archive page
'rewrite' => false, // it shouldn't have rewrite rules
Run Code Online (Sandbox Code Playgroud)
你需要的是第一个元素'public' => false.
| 归档时间: |
|
| 查看次数: |
4769 次 |
| 最近记录: |