[wp-hackers] Help for Plugin Noob

Jamie Talbot wphackers at jamietalbot.com
Sat Jan 28 09:42:02 GMT 2006


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

Eric Hochberger wrote:
> Hey guys,
> 
> Also, when I type in the query ?ld_home=1, the template does load correctly.  It's just the mod
> rewrite that is not working.
> 
> Code to at the bottom:
> 
> Thanks, Eric

> function ld_rewrite_rules($old_rules) { 
> $my_rules['directory/'] = '/index.php?ld_home=1';
> 
> return array_merge($my_rules, $old_rules); } 
> add_filter('rewrite_rules_array','ld_rewrite_rules');


Have you tried dumping out the rewrite rules to check the order that they are being applied in?

You can print_r the result of your array_merge() to check that they're in the correct order.

Also, you could try this:

echo "Match: " ; print_r($match);

after the line $this->matched= $match; in classes.php on or about line 1545.

Which will tell you what rule is being matched.  That might give you a bit more information to help
you debug.

Cheers,

Jamie.

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

iD8DBQFD2zxqrovxfShShFARAikDAKCAPUfk7mHS6p5ziEE94Yhp9vUsxQCfSnfo
5VcFcVpjVbqtQwEBm4+fqfY=
=p8A1
-----END PGP SIGNATURE-----


More information about the wp-hackers mailing list