admin管理员组文章数量:1333634
I have a custom post type registered called Resource
:
$args = array(
'public' => true,
'publicly_queryable' => true,
'capability_type' => 'post',
'hierarchical' => false,
'supports' => array('title', 'thumbnail'),
'register_meta_box_cb' => null,
'taxonomies' => array(),
'has_archive' => false,
'rewrite' => array('slug' => 'resources'),
//'rewrite' => array('slug' => 'resources/%term%'),
//'cptp_permalink_structure' => '%term%',
'query_var' => true,
'can_export' => true
);
register_post_type('resource', $args);
I have these sub-categories under Resource
:
Name Slug
---------------------
eBooks ebook
Brochures brochure
Podcasts podcasts
My question is, the post under Resource
will have permalink like:
I want to change the url structure to become:
I use the plugin Custom Post Type Permalinks, in the setting page, I confuse how to use the %slug%
before /%postname%
, so that the permalink will looks like above samples
I need someone to guide me how can I achieve this.
Thanks.
本文标签: Wordpress Custom Post Type Permalinks dynamic term slugs
版权声明:本文标题:Wordpress Custom Post Type Permalinks dynamic term slugs 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742358036a2459806.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论