不知道这个样式表来自哪里-wordpress php

不知道这个样式表来自哪里-wordpress php,php,css,wordpress,Php,Css,Wordpress,我试图更新我的网站,但我注意到一件事,我不能摆脱原来的样式表。现在我已经进入我的bluehost控制面板并替换了style.css文件。我还进入了自定义css并删除了我在那里的所有css,以确保那里没有任何东西可能超越它。但是如果你访问这个网站,你仍然会看到有两个样式表。我甚至搜索了我的wordpress管理面板,以确保我没有缓存任何东西,但我没有缓存插件。因此,我认为我在php的某个地方搞砸了,但我不确定 因此,当您访问网站并打开inspector并访问源代码时,您将看到2个样式表。style

我试图更新我的网站,但我注意到一件事,我不能摆脱原来的样式表。现在我已经进入我的bluehost控制面板并替换了style.css文件。我还进入了自定义css并删除了我在那里的所有css,以确保那里没有任何东西可能超越它。但是如果你访问这个网站,你仍然会看到有两个样式表。我甚至搜索了我的wordpress管理面板,以确保我没有缓存任何东西,但我没有缓存插件。因此,我认为我在php的某个地方搞砸了,但我不确定

因此,当您访问网站并打开inspector并访问源代码时,您将看到2个样式表。style.css?ver=4.9.1(右侧)和style.css?ver=1.0(旧的)。旧的样式表使导航栏不可见,并向左侧证明了联系人表单的合理性。新的样式表修复了这些问题,但无论出于何种原因,旧样式表仍然存在并覆盖了更改

www.mustafasprojects.com

以下是标题:

<!doctype html>
<html <?php language_attributes(); ?> class="no-js">
    <head>
        <meta charset="<?php bloginfo('charset'); ?>">
        <title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>

        <link href="//www.google-analytics.com" rel="dns-prefetch">

        <link href="<?php echo get_template_directory_uri(); ?>/img/icons/touch.png" rel="apple-touch-icon-precomposed">

        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="<?php bloginfo('description'); ?>">

        <?php wp_head(); ?>
        <script>
        // conditionizr.com
        // configure environment tests
        conditionizr.config({
            assets: '<?php echo get_template_directory_uri(); ?>',
            tests: {}
        });
        </script>

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

        <div id="page-wrapper">
编辑:我在样式表中钩住的其他位置

function html5blank_styles()
{
    wp_register_style('normalize', get_template_directory_uri() . '/normalize.css', array(), '1.0', 'all');
    wp_enqueue_style('normalize'); //

    wp_register_style('html5blank', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');
    wp_enqueue_style('html5blank'); 

在代码中,替换此行:

wp_enqueue_style( 'style_css', get_template_directory_uri() . '/style.css' );
与:


您正在加载两个,这一个在函数中

wp_enqueue_style( 'style_css', get_template_directory_uri() . '/style.css' );
这一个在你的钩子里,把v1.0加到最后

wp_register_style('html5blank', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');

使用不同的名称排队,但两者都有相同的url

是否有缓存插件?火箭缓存、WP超级缓存、W3总缓存等等?@optroot我在我的插件中查看了一下,但我没有缓存插件。我检查了设置以查看是否有数据库备份或类似功能,但该功能在我的wordpress上不可用。我尝试了,它只是删除了新的样式表,而不是旧的样式表。您可以在
获取模板目录uri()
之后添加
数组(),'
,这应该可以使用
wp\u enqueue\u样式('style_css',get_stylesheet_uri(),array(),false,'all')
也不起作用。我想我把它挂在了其他地方。请看我的编辑。将
'1.0'
替换为
false
请看codex谢谢!这样就摆脱了旧的样式表!而且,我刚刚意识到我的引导cdn没有加载。你能帮我吗?这个
函数theme_js()
叫做theme(单数)而这里
add_action('wp_enqueue_scripts','themes_js');
您使用主题(复数)。你的fontawesome样式表加载了,所以我只能猜测为什么引导程序没有加载,因为你使用
https
调用它,并且你的页面通过
http
提供。你使用
http
的fontawesome样式表尝试了这一点,但没有成功。我很确定fontawesome样式表只是因为我导入了我尝试了你所建议的http,但没有成功。
wp_enqueue_style( 'style_css', get_template_directory_uri() . '/style.css' );
wp_register_style('html5blank', get_template_directory_uri() . '/style.css', array(), '1.0', 'all');