Exclude templates in wordpress page
If I put a file up in my theme folder named foo.php
that only contains <h1>Foo</h2>
, WordPress will 开发者_如何学Goautomatically pull in the home.php
file.
Is there any function to prevent that and have it simply render the file foo.php
. I'll still want to be able to use the wordpress functions from that page.
Thanks!
<?php
/*
Template Name: Foo
*/
?>
<h2>Foo</h2>
Saved (obviously) as 'foo.php'.
Then, when you publish a page, through the dashboard using the 'Foo' template, that template will be used.
精彩评论