[wp-hackers] $wp_rewrite->add_permstruct() vs. add_rewrite_rule()

Mike Schinkel mikeschinkel at newclarity.net
Tue Dec 8 05:50:08 UTC 2009


Hi all:

Okay you WP_Rewrite() gurus, now's your time to shine.  

So I've been trying to figure out $wp_rewrite->add_permstruct() vs. add_rewrite_rule() for the past several days. I've been able to get the former to work but not the latter.  I'm trying to figure out when we would use one and when we would use the other?

It *seems* like using add_permastruct() can get you support or things like custom single_template and that add_rewrite_rule() would require use of template_redirect, but I can't be 100% sure?

Can anyone shed some light on these two?  Google has not been my friend in the case of these two functions and how to best use them.

-Mike 




More information about the wp-hackers mailing list