开发者

how to make custom single .php file in wordpress

开发者 https://www.devze.com 2023-02-09 05:35 出处:网络
i make a new page single-1.php but i don\'t call new page . only call sin开发者_如何学编程gle.php

i make a new page single-1.php but i don't call new page . only call sin开发者_如何学编程gle.php how to use single-1.php. any help me


if you name single-1.php the file, wordpress is try to load it, if the custom post type is '1'. Not a good solution.

If you want to use a template that is different from the standard post for the custom post type, name it 'single-'.php. Wordpress will load it automatically for you!

For further information see: http://codex.wordpress.org/Post_Types

Hope this it help!


don't quite understand what you mean, but maybe this works for you:

single.php:

<?php include "single-1.php"; ?>
0

精彩评论

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