The title isn't the best, so feel free to change it to make it more clear...
Problem:
I am trying to load up a page from within a plugin and replace anything that WP puts out. Have it set so if they are on the front page of the site, it will display a PHP page within my plugin:
if(is_front_page()){
$full_path = WP_PLUGIN_URL.'/'.str_replace(basename( FILE),"",plugin_basename(FILE));
$url = $full_path . "/PLUGINNAME/file.php";
include($url);
die();
}
But thats not outputting the file. Even when I put the FULL path to the PHP file, it wont display it, or anything. It will only render up this point, in the source code:
<meta name="generator" content="WordPress 3.3.1" />
Then after that, its nothing.
I have never been able to get include to work, I really don't want to use an iFrame solution.
Thoughts? :)
Thanks!
- Dylan
UPDATE
So I used get_file_contents and the hook template_redirect to achieve this.
Going to do some testing on the live server to see whats up! :)