views:

33

answers:

1

If I put a file up in my theme folder named foo.php that only contains <h1>Foo</h2>, WordPress will automatically 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!

+1  A: 
<?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.

TimS
I still have a hard time w/ comments acting like config files in wordpess. Thank you.
rpflo
See http://codex.wordpress.org/Template_Hierarchy to explain why TimS' solution works.
Michael