[wp-hackers] Displaying a page on-the-fly with a plugin

Dion Hulse (dd32) wordpress at dd32.id.au
Wed Oct 27 02:16:09 UTC 2010


Here's how I'd do it in a plugin if the page had to be transparent.
http://wordpress.pastebin.com/xd0QmvNH
Note, That i've pastebin'd it due to sheer length of the fake post object.
It's a 5 minute job, needs optimizing and all that..

On 27 October 2010 13:06, Anthony Cole <anthony at radiopicture.com.au> wrote:

> I wouldn't see any other alternative to sticking with a page.
>
> I mean, you could create a psuedo page and grab a query_var/rewrite if you
> really wanted to with a custom rewrite rule and in theory grab a page
> template of the current theme and set the_title and the_content up with your
> stuff, but it's kind of misleading to your users and could lead to other
> problems down the road and it could potentially become really messy.
>
> The advantage to having a page is that people actually know that it exists
> and where it's located.
>
> I'm developing an e-commerce plugin right now, and I fully intend to create
> all of the pages for the process (checkout, cart, payment, etc).
>
> -ac
>
> On 27/10/2010, at 3:00 PM, Dino Termini wrote:
>
> > On 10/26/2010 9:56 PM, Anthony Cole wrote:
> >> I would use a shortcode, and you could filter out the_content and
> replace it with do_shortcode('shortcode')  or a function, checking the Post
> ID through the post global.
> >>
> >> Would be interested to see if anyone else has a suggestion.
> >>
> >> -ac
> >
> > Right, but the point is to totally avoid creating this page at all :-)
> >
> > dino.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> 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