0
我有添加boostrap到WordPress的儿童主题的问题。无法在wordpress中导入引导程序
这是怎么看我的文件夹中的子主题: http://i.imgur.com/vuOvYJ3g.jpg
,并没有从css文件夹中的内容 http://i.imgur.com/AsQAi3r.jpg
在function.php我尝试这样做:
function theme_add_bootstrap() {
wp_enqueue_style('bootstrap-css', get_template_directory_uri() . '/css/bootstrap.min.css');
wp_enqueue_style('style-css', get_template_directory_uri() . '/style.css');
wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '3.0.0', true);
}
add_action('wp_enqueue_scripts', 'theme_add_bootstrap');
但没有工作,在index.php我写了类col-sm-3
和Chrome的检查元素,不能从bootstrap读取类和样式。
你能帮助我,非常感谢你!
仍然不能工作:( – ml92
您可以通过打开浏览器开发工具来验证文件是否成功加载,然后导航到网络选项卡,特别是筛选您想检查的资产,这样,您就可以验证如果资产成功加载 –
空,看这个图片http://i.imgur.com/5So4C7d.jpg – ml92