我正在尝试更改我的215主题中条目页脚的颜色。我在子主题中的修改被覆盖,因为当网站在浏览器中呈现时,WordPress会将主题定制器生成的内联CSS输出到<head>
, 它覆盖样式表。
检查自定义程序。php文件,我看到了三个相关部分。首先是配色方案。然后,创建颜色变化并通过以下方式转换为rgba:
$color_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[3] );
$color_sidebar_textcolor_rgb = twentyfifteen_hex2rgb( $color_scheme[4] );
$colors = array(
\'background_color\' => $color_scheme[0],
\'header_background_color\' => $color_scheme[1],
\'box_background_color\' => $color_scheme[2],
\'textcolor\' => $color_scheme[3],
\'secondary_textcolor\' => vsprintf( \'rgba( %1$s, %2$s, %3$s, 0.7)\', $color_textcolor_rgb ),
\'border_color\' => vsprintf( \'rgba( %1$s, %2$s, %3$s, 0.1)\', $color_textcolor_rgb ),
\'border_focus_color\' => vsprintf( \'rgba( %1$s, %2$s, %3$s, 0.3)\', $color_textcolor_rgb ),
\'sidebar_textcolor\' => $color_scheme[4],
\'sidebar_border_color\' => vsprintf( \'rgba( %1$s, %2$s, %3$s, 0.1)\', $color_sidebar_textcolor_rgb ),
\'sidebar_border_focus_color\' => vsprintf( \'rgba( %1$s, %2$s, %3$s, 0.3)\', $color_sidebar_textcolor_rgb ),
\'secondary_sidebar_textcolor\' => vsprintf( \'rgba( %1$s, %2$s, %3$s, 0.7)\', $color_sidebar_textcolor_rgb ),
\'meta_box_background_color\' => $color_scheme[5],
);
最后,实现css规则,例如条目页脚颜色在:
blockquote,
a:hover,
a:focus,
.main-navigation .menu-item-description,
.post-navigation .meta-nav,
.post-navigation a:hover .post-title,
.post-navigation a:focus .post-title,
.image-navigation,
.image-navigation a,
.comment-navigation,
.comment-navigation a,
.widget,
.author-heading,
.entry-footer,
.entry-footer a,
.taxonomy-description,
.page-links > .page-links-title,
.entry-caption,
.comment-author,
.comment-metadata,
.comment-metadata a,
.pingback .edit-link,
.pingback .edit-link a,
.post-password-form label,
.comment-form label,
.comment-notes,
.comment-awaiting-moderation,
.logged-in-as,
.form-allowed-tags,
.no-comments,
.site-info,
.site-info a,
.wp-caption-text,
.gallery-caption,
.comment-list .reply a {
color: {$colors[\'secondary_textcolor\']};
}
我的问题是:如何为我自己的方案添加更多颜色(因此它将包含六种以上的颜色),然后在上面所示的第二阶段为其命名,最后在第三阶段实现规则?