[wp-testers] A Question About 2.7/2.8 argument system

Paul Robinson pablorobinson at gmail.com
Sat Dec 27 22:06:03 GMT 2008


Lol, sorry. I found out that if you are developing a plugin & you are using
a system that allows the definition of arguments like showposts=4&cat=1 etc
you can define arrayed values in the query string using square brackets like
this showposts[post]=1&showposts[post2]=2&cat=1. According to the same site
I found that from though it is impossible to provide multiple values to one
parameter... I wish there was a way though because that way I found still
doesn't work for what I want to do...

Anyone else got any ideas. I know you can get multiple categories in
wordpress like this cat=1,2,3,4 but I've never figured out how WP does
that... I'm assuming it uses parse_str() to parse the query string to
variables & then explodes cat like explode(',', $cat); type of thing. Is
that right?

Paul.

2008/12/27 Stephen Rider <wp-hackers at striderweb.com>

> To help other readers on the list, you should generally specify *what* you
> figured out when you post something like this.  Share the info! :)
>
> On Dec 27, 2008, at 10:37 AM, Paul Robinson wrote:
>
>  Scrap that question I've just this minute figured it out.
>>
>> 2008/12/27 Paul Robinson <pablorobinson at gmail.com>
>>
>>  This might be a little off topic, but you guys seem to know more about
>>> the
>>> coding side of things than I could ever get out of the forum.
>>>
>>> Is there a way to provide more than one value to a parameter in an
>>> arugment
>>> list. For example when you call query_posts(); can you do this:
>>>
>>> <?php query_posts('showposts=2,5'); ?>
>>>
>> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list