php 调用未定义的函数get_header()

k4ymrczo  于 2022-12-21  发布在  PHP
关注(0)|答案(2)|浏览(158)

错误:致命错误:调用第1行C:\Xampp\xampp\htdocs\index.php中未定义的函数get_header()
指标代码:

<?php get_header(); ?>
<?php get_sidebar()?>
    <div id="left">

    <?php_while(have_posts()):?>

        <h2><?php the_title()?></h2>
        <?php the_content();?>

    <?php_endwhile();?>

    </div>

<?php get_footer()?>`
acruukt9

acruukt91#

函数get_header()是一个wordpress主题函数,您正在调用它从:
C:\Xampp\xampp\htdocs\index.php
把同样的代码放在一个wordpress主题中,它就会工作。

yizd12fk

yizd12fk2#

hi我面临同样的问题
去“访问网站”从wordpress栏菜单你会看到这代码运行

相关问题