[wp-hackers] URL Query Strings being Preserved

Christian Wach needle at haystack.co.uk
Thu Jul 16 09:04:08 UTC 2009


Hi Dan,

On 16 Jul 2009, at 08:24, Dan Cameron wrote:

>> I wouldn't consider it an error, since it could just as easily be  
>> regarded as desired behavior.
>
> Yeah, after thinking about it for a bit I realized there's plenty of  
> reasoning to have it. One main reason would be to keep querystrings  
> that sort persistent when navigating through an archive ( e.g.  
> product catalogs ).
>
> I ended up writing a filter that I don't mind anyone improving on:
>
> This way I can specify the query string that should be trimmed and  
> preserving any other qs that may be needed.

I may be missing something here, but isn't this what  
remove_query_arg() already does? :)

Cheers,

Christian



More information about the wp-hackers mailing list