【发布时间】:2016-04-09 13:39:49
【问题描述】:
<!--functions.php-->
<?php
function learningWordPress_resources() {
wp_enqueue_style('style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts', 'learningWordPress_resources');
我在 wordpress 中的导航栏下方收到消息“class="home blog logged-in admin-bar no-customize-support">”,我正在从头开始编写代码。有谁知道如何删除这个?如果是这样,您的帮助将不胜感激:)
(由于依赖wordpress,附上的代码不会在这里运行。希望附上的图片足以说明情况)
/*
CSS:
Theme Name: Yonsei Fencing
Author: Yonsei Student
Version: 1.0
*/
<!--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'); ?> - © <?php echo date('Y');?></p>
</footer>
<?php wp_footer(); ?>
</body>
</html>
【问题讨论】:
-
您是否在
functions.php文件中添加了任何自定义函数来自定义body 类? -
您好,我现在刚刚添加了一个,但似乎没有任何变化。