categories - Change background image page header overlay for each category

this is my site:and I'm trying to change the background image page header overlay for each category. I have been

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 badge
Add a comment  | 

1 Answer 1

Reset to default 0

This 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745553233a4632674.html

相关推荐

  • categories - Change background image page header overlay for each category

    this is my site:and I'm trying to change the background image page header overlay for each category. I have been

    10小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信