[wp-hackers] How to parse a query .

sai krishna hodude81 at yahoo.com
Wed Dec 27 12:43:27 GMT 2006


Hi,
  Donot mind my questions if they are too silly as I just started coding on this.Also on my english too. Im still unclear where is what in word-press.
   
  I tried adding this in various places, but it is not getting 'loc'..  Its getting the rest of the query_vars like Array ( [feed] => rss3 [m] => 0 [p] => 0 )
   
  Can you tell me where exactly parsing of query happens, I mean which file.... 
   
  I tried putting classes.php, wp-feed.php, wp-rss3.php (this is my file, exactly same only name is different as of now).
   
   
  Thank You
  Sai Krishna

Jamie Talbot <wphackers at jamietalbot.com> wrote:
  -----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-----
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the wp-hackers mailing list