Answer the question
In order to leave comments, you need to log in
How to set custom taxonomy url?
Greetings.
1. there is a custom post type news
2. it has a category_news taxonomy
3. the link to the news category now looks like this: site.ru/category_news/category_name
Question: how to change the url to site.ru/news/category_name
---
/category_news /category_name -> /news/category_name
Answer the question
In order to leave comments, you need to log in
Hey! You need to use rewrite for the "category_news" taxonomy.
In your case, there will be a rewrite => ["slug" => "news"] argument
You can read more about this here: https://wp-kama.ru/function/register_taxonomy#rewrite
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question