Wordpress上的奇怪消息

ROK*_*KAF 2 css php wordpress

<!--functions.php-->
<?php

function learningWordPress_resources() {

	wp_enqueue_style('style', get_stylesheet_uri());

}

add_action('wp_enqueue_scripts', 'learningWordPress_resources');
Run Code Online (Sandbox Code Playgroud)

我收到消息"class ="主页博客登录管理栏no-customize-support">"我在wordpress的导航栏下面从头开始编码.有谁知道如何删除它?如果是这样,我们将非常感谢您的帮助:)

(附加的代码不会在这里运行,因为它依赖于wordpress.希望附加的图片足以解释这种情况)

/* 
CSS:
Theme Name: Yonsei Fencing
Author: Yonsei Student
Version: 1.0
*/
Run Code Online (Sandbox Code Playgroud)
<!--index.php-->
<?php

get_header();

if (have_posts()) : 
	while (have_posts()) : the_post(); ?>

	<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
	<?php the_content(); ?>
	
	<?php endwhile;

	else: 
		echo '<p>No content found</p>';

	endif;

get_footer();

?>

<!--header.php-->
<!DOCTYPE html>
<html> <?php language_attributes(); ?>>
	<head>
		<meta charset="<?php bloginfo('charset'); ?>">
		<meta name="viewport" content="width=device-width">
		<title><?php bloginfo('name'); ?></title>
		<?php wp_head(); ?>
	</head>

<body> <?php body_class(); ?>>

	<!--site-header-->
	<header class="site-header">
		<h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></h1>
		<h5><?php bloginfo('description'); ?></h5>
	</header><!--/site-header-->


<!--footer.php-->
<footer class="site-footer">

	<p><?php bloginfo('name'); ?> - &copy; <?php echo date('Y');?></p>

</footer>

<?php wp_footer(); ?>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的网页

ran*_*ame 5

问题是,该功能body_class()属于内部body标签,但在你的代码已经发布,它之后body标签.

改变你的代码如下,你很高兴:

从此开始,首先关闭body标签:

<body> <?php body_class(); ?>>
Run Code Online (Sandbox Code Playgroud)

对此,它包含body_classbody标签内部:

<body <?php body_class(); ?>>
Run Code Online (Sandbox Code Playgroud)