Answer the question
In order to leave comments, you need to log in
How to create custom permalink tag in Wordpress?
It is necessary that the custom taxonomy be included in the url of posts (regular, non-custom post type) as a category. I did it this way: I registered it in the settings
http://siringallery.ru/%wall%/%postname%/
, and in the code the function on the event pre_post_link
replaces it %wall%
with the desired taxonomy element. It would seem that success, only now my pages give a 404 error, because they are looking for a taxonomy element with the page name, and not a page. But the placeholder %category%
doesn't do that, so how do you get your placeholder right?
Answer the question
In order to leave comments, you need to log in
Did you drop permalinks?
Switch to any other scheme, save, then back to your chosen scheme and Save again.
Other solutions to the problem:
look towards https://developer.wordpress.org/reference/function... (there are examples of regular expressions at the bottom of the page).
try plugin https://wordpress.org/plugins/permalink-editor/ .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question