[wp-hackers] How to parse a query .

Jamie Talbot wphackers at jamietalbot.com
Wed Dec 27 10:59:15 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

sai krishna wrote:
> Hello all,
>    
>   Im passing a query in URL for feed=rss2&loc=london.
>   The $qv when I print  this, I could see only feed=rss2 getting printed.
>   Where and how I need to take up this. Kindly some one let me know the procedure
>    
>    
>   Thank You
>   Sai Krishna

You probably need to use the query_vars hook.  Mark Jaquith posted some code that might be of use a
little while ago:

http://comox.textdrive.com/pipermail/wp-hackers/2006-December/009937.html

This part might help you:

> function your_add_query_vars($query_vars) {
> 	$query_vars[] = 'loc';
> 	return $query_vars;
> }

> add_filter('query_vars', 'your_add_query_vars');

Cheers,

Jamie.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFklICrovxfShShFARAtyaAJ0byFUxE+PIT5OOok/uWQ512JuewwCcCHAL
VAg66/ChIEDBgmeww6vjCFA=
=4x06
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list