wordpress中如何创建一个和index.php效果一样的页面啊

百度上有人说用index.php创建一个模板然后使用,但是最后结果是页面只有header footer和页面名称,跟index的效果完全不一样,怎么破!

阅读 2.8k
1 个回答

index.php 文件需要包括

<?php get_header(); ?>
index 的内容
<?php get_footer(); ?>

其中 get_header 函数是调用 header.php 文件
get_footer 函数是调用 footer.php 文件

三者(header.phpindex.phpfooter.php)组成了 wordpress 网站首页,也就是头部内容尾部.

至于你的问题太模糊我无法解答.