小编Jes*_*m17的帖子

未捕获的错误:调用未定义的函数have_post()

我试图看看我的WordPress主题,但收到此错误:

致命错误:未捕获错误:调用C:\ xampp \ htdocs \ wordpress \ wp-content \ themes \ ChachoTheme \ index.php:6中未定义的功能have_post()堆栈跟踪:#0 C:\ xampp \ htdocs \ wordpress \ wp-includes \ template-loader.php(74):include()#1 C:\ xampp \ htdocs \ wordpress \ wp-blog-header.php(19):require_once('C:\ xampp \ htdocs ... ')#2 C:\ xampp \ htdocs \ wordpress \ index.php(17):require('C:\ xampp \ htdocs ...')#3 {main}抛出C:\ xampp \ htdocs \ wordpress \第6行的wp-content \ themes \ ChachoTheme \ index.php

index.php:

<?php if (have_post() ):?>
  <?php while(have_post()):the_post(); ?>

<div id="post">

  <h2><a href="<?php the_permalink(); ?>"></a><?php the_title(); ?></h2>
  <div …
Run Code Online (Sandbox Code Playgroud)

wordpress

2
推荐指数
1
解决办法
3914
查看次数

标签 统计

wordpress ×1