I am attempting to write a plugin which will display a dynamic page based on a GET request. For example:
http://mydomain.com/?showme=thisitem
would display a page with information about "thisitem".
I would also like to make this theme independent so I would like to not require a special template. I'm not sure of the best way to do this.
I thought this would be the approach to take but I can not figure out how to bulldog my page content into the page. This, of course, doesn't work but it demonstrates what I'm trying to do:
add_action('init', 'show_item');
function show_item() {
$showme = $_GET['showme'];
if ( !empty($showme) ){
$post="My Dynamic Page Content";
include(TEMPLATEPATH . '/page.php');
exit;
}
}
how do I go about getting my own page content to display like normal page content?