skip to Main Content

WordPress – How to properly rewrite a post tag?

Suppose I have a post tag which have as term id 480, I'm trying to create a redirect using add_rewrite_rule, so far I did: function term_custom_redirect() { $referer_url = "en/tag/a-lange-sohne"; add_rewrite_rule( "^$referer_url/?$", 'index.php?p=' . 480, "top" ); flush_rewrite_rules(); } add_action('init',…

VIEW QUESTION
Back To Top
Search