Fixing custom rewrite rule

I see a second ? in your query variables (before the cls query variable), probably from experimenting with the commented-out form, I think you want to use & there. Your query_vars hook currently adds the id variable, but you use cls and ch in your rewrite rule, so this will not have an effect. If … Read more

How to redirect a link to a new link?

Go with the easiest alternative of all: do nothing. No, really: WordPress itself handles redirects for renamed Post Titles. Edit Apparently, the retention of _wp_old_slug only happens for non-hierarchical objects. So, since Pages are hierarchical, they don’t get to enjoy the auto-magic slug redirection. Therefore, for static Pages or other hierarchical post objects, I would … Read more