开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜