[wp-hackers] URL Query Strings being Preserved

Jared Bangs jaredbangs at gmail.com
Wed Jul 15 06:12:32 UTC 2009


I think it depends what you mean by "issue"; it looks like it's an
intentional "feature" to me.

For example, if you look in the wp-includes/link-template.php file at the
get_pagenum_link function (which is used by the previous_posts_link function
most themes use for paging back to older posts), it would seem that the
extraction and preservation of the query string arguments is done
intentionally, for the purpose of adding it back to the URL the function is
going to return.

Is it somehow causing trouble for you with something else? I wouldn't
consider it an error, since it could just as easily be regarded as desired
behavior.

As for other places where it doesn't appear to happen, there could be any
number of explanations: filters removing it, using different functions
within the template to get those links, etc.

On Tue, Jul 14, 2009 at 10:52 PM, Dan Cameron <dan at sproutventure.com> wrote:

> Anyone run into an issue where a query string is being preserved throughout
> the site?
>
> Thanks in advance.
>
> Use case:
>
> Load any page with http://blog.com?load=1
> Navigational link ( e.g. next_posts_link ) preserver ?load=1
>
> Example:
>
> http://dancameron.org/category/asides?load=2
> Then review the URL for "older posts" it shows
> http://dancameron.org/category/asides/page/2?load=2
>
> I noticed some WP installs are not having this issue, i.e.
> http://ma.tt/2009/07/headphone-recommendations/?load=2
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list