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

Anthony Cole anthony at radiopicture.com.au
Wed Oct 27 01:56:19 UTC 2010


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

On 27/10/2010, at 2:46 PM, Dino Termini wrote:

> Hi everybody,
> 
> I'm developing a plugin that displays a page for the users with various options. Right now, I'm using
> 
> insert_post()
> 
> to create the page when the plugin is activated, and then add_filter('the_content') whose attached functions runs only if the ID of the current page matches the one of the page I created. Some of my users have pointed out that creating a new page 'clutters' their blog, so I was wondering if there's a different way to "load the current theme" and display my custom content in place of the_content(). Please let me know if you need more details.
> 
> Thanks,
> Camu
> _______________________________________________
> 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