admin管理员组文章数量:1291223
I have this very specific questions. On my homepage I decided to show excerpts of the latest news and events with a "while" loop. The issue is that I want the admin to define what the permalink will be of said post, and not have a /event/lorem-ipsum page for each event. The idea is to link those excerpts to Instagram posts, Facebook posts, or whatever...
My custom_post_type function is:
register_post_type('event',
array(
'rewrite' => array('slug' => 'events'),
'labels' => array(
'name' => 'Events',
'singular_name' => 'Event',
'adding_new_item' => 'Add event',
'edit_item' => 'Edit event'
),
'menu-icon' => 'dashicons-calendar-alt',
'public' => true,
'has_archive' => true,
'supports' => array(
'title', 'thumbnail', 'editor',
)
)
);
本文标签:
版权声明:本文标题:permalinks - How to keep WP from creating a "single-post" page and let the user input the link of the post in 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741508396a2382457.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论