WordPress 2014主题 - 背景颜色:页眉,页脚,侧栏,页面和帖子

时间:2013-12-27 12:40:19

标签: wordpress

我还是WP的新手,我不知道在编辑器中我可以在哪里更改这些颜色(我知道我必须首先创建一个子主题,以免打扰原始代码。)

问候。

编辑:

我甚至无法让儿童主题正常运作:

/*
Theme Name: Twenty Fourteen Child
Theme URI: xxxhttp://www.xxx.xxx/wp-content/themes/twentyfourteen-child/
Description: Twenty Fourteen Child Theme
Author: John Doe
Author URI: xxxhttp://www.xxx.xxx
Template: twentyfourteen
Version: 1.0.0
*/

@import url("xxxhttp://www.xxx.xxx/wp-content/themes/twentyfourteen/style.css");

/* =Theme customization starts here
-------------------------------------------------------------- */

激活主题,但没有显示:xxxhttp://i.imgur.com/mOq1h7z.png

但主题细节是正确的:xxxhttp://i.imgur.com/wxZoxok.png

博客上没有显示任何内容:xxxhttp://i.imgur.com/g5ujPdL.png

...帮助

3 个答案:

答案 0 :(得分:0)

  There are two ways:
  1) Right click on front site and inspect element and find the line number of 
     style.css and edit whatever you want.

  2) Follow given screenshot in admin:![Appearance->Background or Header][1]


      [1]: http://i.stack.imgur.com/xnJLj.png

答案 1 :(得分:0)

据我所知,在WordPress附带的可视化编辑器中无法做到这一点(对于Twenty Fourteen主题,就是这样)。

你对儿童主题是正确的。我强烈建议您在篡改样式表之前创建自己的子主题。

How to create a child theme

创建子主题后,可以向其添加CSS规则。

带有CSS规则的子主题style.css文件示例,用于更改页脚背景颜色:

/*
 Theme Name:     user3134685's theme
 Theme URI:      http://example.org
 Description:    user3134685's theme
 Author:         User 3134685
 Author URI:     http://example.org
 Template:       twentyfourteen
 Version:        1.0.0
*/

@import url("../twentyfourteen/style.css");

/* =Theme customization starts here
-------------------------------------------------------------- */


.site-footer{
background-color:#770000; /*Dark red*/
}

您要更改的其他元素具有类似的CSS类或ID,您必须在style.css文件中键入。您可以使用Firebug等Web开发人员工具和元素检查工具轻松找出它们。

答案 2 :(得分:0)

首先,您需要创建一个子主题,基本上为您的二十四个主题创建一个子style.css。您可以使用Notepad ++等免费编辑器编辑您的子style.css。从仪表板激活您的子主题后(您所做的是正确的),将所有修改添加到同一文件的底部。

有关详细信息,您可以查看Twenty Fourteen Child Theme以及How to Customize Twenty Fourteen Theme