【发布时间】:2016-03-31 00:57:12
【问题描述】:
the chrome dev tools - output from the conlost 我是 wordpress 的新手,我正在尝试附加到主题主样式表,但是我有问题,样式规则不适用于页面。到目前为止,这是我的 index.php 文件:
<?php
get_header();
if (have_posts()):
while (have_posts()):
the_post();
the_title();
the_excerpt();
the_author();
endwhile;
endif;
get_sidebar();
get_footer();
?> 这是我用于上传样式表的 functions.php 文件:
<?php
function add_theme_scripts() {
wp_enqueue_style( 'main', get_stylesheet_uri(), false );
}
add_action("wp_enqueue_scripts", "add_theme_scripts");
?>
但是我尝试通过头文件头部的blogifno上传样式,但它也不起作用,页面显示根本没有样式这是怎么回事? css 文件位于根文件夹中,没有任何子文件夹
【问题讨论】: