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 网站首页,也就是头部内容尾部.

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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进