How do I use the same slugs for custom post types and taxonomies in WordPress

前端 未结 2 1235
甜味超标
甜味超标 2021-02-04 19:12

I\'m new here and I need your help because I don\'t understand how to solve this.

I need to register a new custom post type \"tutorials\", because I want to have a diffe

2条回答
  •  抹茶落季
    2021-02-04 20:12

    The key is to use the same custom taxonomy name in the rewrite of custom post type. Like so: "rewrite" => array( "slug" => "web-tutorials/%custom-taxonomy-name%" ),

    While your custom taxonomy name is custom-taxonomy-name.

    The full explanation and solution you could find here

提交回复
热议问题