Change cannonical URL after changing url with add_rewrite_rule()
Okay, I found a way to do it, if someone ever need to create a permalink or change a permalink for a virtual page or a dynamic page, here’s how: The get_permalink(), the_permalink() and get_the_permalink() functions may be filtered by using the post_type_link, page_link and/or post_link filters, each one of these is for one kind … Read more