[wp-hackers] Map a custom url to its content

Nathaniel Taintor goldenapplesdesign at gmail.com
Tue May 18 12:40:55 UTC 2010


There's a really useful plugin called "Fake Page 2" that may help with that.
http://scott.sherrillmix.com/blog/blogger/creating-a-better-fake-post-with-a-wordpress-plugin/comment-page-1/

it creates a new class FakePage() which you can call from your plugin/theme
with any slug, title, and content. The only weakness I see in it is that you
can't set the page template anywhere that I can see, so it will use your
page.php template for formatting. I've seen it used successfully in a couple
of plugins - G-Lock Double Opt-in Manager has a good implementation of it
for responding to submitted form data.


Date: Tue, 18 May 2010 17:28:27 +0530
> From: Rajasekharan S <rajasekharan.s at tcs.com>
> Subject: [wp-hackers] Map a custom url to its content.
> To: wp-hackers at lists.automattic.com
> Message-ID:
>        <OF1B96CC3D.79EAA364-ON65257727.0040FBC5-65257727.0041CCBB at tcs.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi all,
>
> Here's what I want my plugin to do:
>
> I want my plugin to map a URL on the blog to some content that it will
> generate like a form. The plugin generates the URL. For example:
>
> http://www.myblog.com/my-app-reserves-this-url-automatically/
>
> Visitng the URL generates shows a form. This web page is not a "page" of
> any content type that was created using the wordpress admin panel.
> Generating this page should not require the user to create a page or post
> manually using the admin panel.
>
> So my question is :
>
> How can I map a URL to a function that will return some content that the
> user will see at that URL?
>
> Raj
>
>
> Rajasekharan S
> Tata Consultancy Services
> Mailto: rajasekharan.s at tcs.com
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty.   IT Services
>                        Business Solutions
>                        Outsourcing
> ____________________________________________
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> ------------------------------
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
> End of wp-hackers Digest, Vol 64, Issue 41
> ******************************************
>


More information about the wp-hackers mailing list