[wp-hackers] Plugin replacing a page based on http variables
Casey Bisson
casey.bisson at gmail.com
Thu Sep 20 14:16:28 GMT 2007
By the time the template_redirect hook is triggered, WP has already
queried the DB, found the page, and set the object cache. Your plugin
could manipulate the cache, changing the content of the page.
On Sep 20, 2007, at 7:04 AM, James Davis wrote:
> Alex Günsche wrote:
>
>> The template_redirect hook will replace the actual output with yours.
>
> That's almost, but not quite what I'm looking for. I'd like to
> output a
> 'page' in the style of the selected theme's page.php rather than one
> I've written myself. Something like the following pseudo-code.
>
> function mycontent() {
> if ('bar' == $_GET['foo']) {
> output_page(current_theme,$mypage_title,$mypage_content);
> }
> }
>
> James
More information about the wp-hackers
mailing list