[wp-hackers] add_rewrite_rule error

Jeremy Clarke jer-wphackers at simianuprising.com
Tue May 13 13:03:46 GMT 2008


When the canonical urls were first implemented they broke a ton of
stuff on our site so we just turned them off. Makes your custom URLs
act a lot more like you expect them to (you can add ?x=y to the end of
things again!):

 ///////////////////////////////////////////////
 // TURNS OFF WP'S BUILT IN CANONICAL URLS FUNCTION
 remove_filter('template_redirect', 'redirect_canonical');


Obviously not the ideal solution, but if your special urls are more
important than the canonical effect it can be a decent tradeoff. (i'm
not sure exactly what the situation was, but i remember thinking that
it would be very impractical to keep them on).

-- 
Jeremy Clarke | http://simianuprising.com
Code and Design | http://globalvoicesonline.org


More information about the wp-hackers mailing list