[wp-hackers] Re: template_redirect Examples

Bill Smith ml_wordpress at copperleaf.org
Fri Aug 19 14:32:45 GMT 2005


The part I'm missing (that I didn't ask very well) is in the function 
called by the hook, how do I grab the "name" of the page and any of it's 
parameters?

Ex. http://www.copperleaf.org/mypage/ or 
http://www.copperleaf.org/index.php/mypage/

David House wrote:

>Bill, it's just like any other hook. Write the code you want to happen
>just before the template redirects happen, stick it in a function,
>then hook that function onto the templates_redirect action as
>described in the Plugin API page on the codex.
>
>On 8/19/05, Bill Smith <ml_wordpress at copperleaf.org> wrote:
>  
>
>>I'm trying to play with pages and template_redirect in a plugin. Does 
>>anbody know of some examples or resources that can better explain it? 
>>The info in the codex seems a little vague.
>>
>>Thx,
>>Bill
>>_______________________________________________
>>wp-hackers mailing list
>>wp-hackers at lists.automattic.com
>>http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>    
>>
>
>
>  
>



More information about the wp-hackers mailing list