admin管理员组文章数量:1429844
this is my site: / and I'm trying to change the background image page header overlay for each category. I have been looking at many forums but I didn't get with the correct answer.
For example: on this page / it should show a different background image page header overlay than this one: /
If anybody could help me with this I will be very grateful.
this is my site: http://styleofchamp/ and I'm trying to change the background image page header overlay for each category. I have been looking at many forums but I didn't get with the correct answer.
For example: on this page http://styleofchamp/category/futbol/ it should show a different background image page header overlay than this one: http://styleofchamp/category/tenis/
If anybody could help me with this I will be very grateful.
Share Improve this question asked Apr 25, 2019 at 14:38 Ma. Florencia Fernández CarusoMa. Florencia Fernández Caruso 31 bronze badge1 Answer
Reset to default 0This is probably the easiest method.
If you inspect the <body>
tag by pressing F12 in your browser you will see it has a different class for each category. You can use this to target your header element for each specific category.
For example, this will change the image for category 6.
body.category-6 .page-header {
background-image: url( http://styleofchamp/wp-content/uploads/2019/04/sabri-tuzcu-190600-unsplash-1.jpg ) !important;
}
Note: You can upload images via the file uploader and then just replace the correct path for the background-image URL.
CSS changes can be added to Appearance > Customize > Additional CSS
本文标签: categoriesChange background image page header overlay for each category
版权声明:本文标题:categories - Change background image page header overlay for each category 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745553233a2663040.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论