Answer the question
In order to leave comments, you need to log in
How to intercept link generation in WP?
Hello!
Essence of the question: there are links generated by the system (for example, a link to a category). Let's say that /category/cat/post
I want the links on the pages and in the breadcrumbs to look like /sometext/post
(this is not the actual goal, but just a hypothetical example
) I have already added the corresponding rules (so that /sometext/post opens correctly) through the native rewrite api. But the problem is that even after adding a new rule and deleting the old one (with a category), the links on the pages remain unchanged and lead to the wrong place. And I have not yet found a way to influence this through hooks and filters.
Actually, the question is - how to rewrite not only the rewrite rule, but also the link? ..
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question