错误:致命错误:调用第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()?>`
2条答案
按热度按时间acruukt91#
函数
get_header()
是一个wordpress主题函数,您正在调用它从:C:\Xampp\xampp\htdocs\index.php
把同样的代码放在一个wordpress主题中,它就会工作。
yizd12fk2#
hi我面临同样的问题
去“访问网站”从wordpress栏菜单你会看到这代码运行