<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
有没有办法在不影响其他页面的情况下更改特定页面的 WordPress 站点标题颜色?
例如,如果我有一个包含以下页面的网站:
然后我将 header 设置为 background-color: grey
。
但是对于 blog
页面仅,我想将页眉设置为具有background-color: yellow
。
如何处理这种情况?
就我而言,这是页面:http://xusom2.mymediapaldesign.com/?page_id=320
(请注意此链接无效;它仅用于说明。)
最佳答案
WordPress 有一个函数 body_class()
.您可以使用 page-id-{ID}
CSS 类来定位由页面 ID 给出的特定页面。在您的情况下 .page-id-320
。
关于php - WordPress:如何更改特定页面上的标题颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34670776/
相关文章:
javascript - 使用 javascript 在第二个选择表单中仅显示相关项目
php - 使用 php (zend gdata) 在浏览器中登录 google
php - 在查看订阅页面 woocommerce 中显示与订阅相关的许可证
php - 在 Woocommerce 中的每个项目名称旁边显示购物车中的产品自定义字段
php - Wordpress div 未显示在站点的本地主机版本上
javascript - jQuery 克隆表单提交不起作用
jquery - 未捕获的类型错误 : Cannot read property 'clientWidth' of null