Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress主体类未实现_Php_Css_Wordpress_Stylesheet - Fatal编程技术网

Php Wordpress主体类未实现

Php Wordpress主体类未实现,php,css,wordpress,stylesheet,Php,Css,Wordpress,Stylesheet,我正在尝试为wordpress主题Flexform创建模板。我已经创建了一个页面以及该页面的特定标题。我不需要添加body_类调用,因为它已经存在: <body <?php body_class($page_class . ' ' . $is_responsive . ' ' . $extra_page_class); ?>> 备选案文2 body.page-template-beach-php #top-bar { background: #702c91 !impor

我正在尝试为wordpress主题Flexform创建模板。我已经创建了一个页面以及该页面的特定标题。我不需要添加body_类调用,因为它已经存在:

<body <?php body_class($page_class . ' ' . $is_responsive . ' ' . $extra_page_class); ?>>
备选案文2

body.page-template-beach-php #top-bar {
background: #702c91 !important;
background-color: #702c91 !important; }
备选案文3

body .page-template-beach-php #top-bar {
background: #702c91 !important;
background-color: #702c91 !important; }
选择4

.page-template-beach-php < #top-bar {
background: #702c91 !important;
background-color: #702c91 !important; }

目前,我甚至无法让它作为一种过度书写的样式显示在google inspect上。

假设DOM中有一个id为top bar的元素,那么选项1应该可以正常工作

您能提供一个URL来查看吗?

我添加了:

.page模板位于顶部栏中{ 背景:红色; }


添加到styles.css的第1421行,它似乎生效了。

听起来您的css文件可能没有正确包含。另外,不要在CSS中添加重要语句。重要信息应作为最后手段使用。请提供一个链接。链接在下面对StewD的评论回复中。这是一个我没有制作的wordpress主题,但是所有其他css都在正确调用,所以我不确定这到底有什么不同。还有,“!由于现场的限制,此处的“重要”声明存在。我正在尝试设计另一个预先存在的网站,以配合不同的公司,我们仍然需要所有的第一家公司和布局旧的CSS。我试图避免使用'!重要提示“通过为此页面设置特定类的样式,但它不起作用,因此我尝试将其作为最后手段,但它显然仍然不起作用,因此我在这里。目前我求助于直接编辑模板,这不是我的理想解决方案,但它暂时完成了工作。这里的链接,它的密码保护,因为我真的不想它公开了。PW:stackoverflow我可以让它在google的inspect元素视图上生效,但是当我在实际的CSS文件中使用它时,它不起作用。我不知道为什么。可能调用不正确。是否使用此处的样式表?:嗯,当我将上面的样式添加到样式表中时,它工作正常。它是由CDN提供的,因此您可能会获得一些缓存,最好在Chrome Incognito窗口中尝试,或者从Inspector settings中选择disable cache选项,然后重试。
body .page-template-beach-php #top-bar {
background: #702c91 !important;
background-color: #702c91 !important; }
.page-template-beach-php < #top-bar {
background: #702c91 !important;
background-color: #702c91 !important; }