- This topic has 1 reply, 2 voices, and was last updated 5 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Free Themes › Travel Insight › How to change header image of individual categories
Hello,
I’d like to change the header for each category and I cannot figure out how to get this done. Any help would be appreciated. To be specific, I’d like each category to have a different header (I do know how to change the overall header in the customize section). Thank you!
Hello @janansiam,
To change the header in category page add below given CSS by going to Admin Panel > Appearance > Customize > Additional CSS.
body[class*="category"] #banner-image {
background-repeat: no-repeat;
background-position: center;
background-size: cover;
padding-bottom: 55%;
}
body[class*="category"] #banner-image img {
display: none;
}
.category-73 #banner-image {
background-image: url('https://cms-assets.tutsplus.com/uploads/users/1500/posts/31260/image/summer_nature_background_with_green_grass_and_butterfly_and_blue_sky.jpg');
}
For above given CSS, you have to replace the category ID with your category ID. Similarly, for other category add the same CSS which is :
.category-73 #banner-image {
background-image: url('https://cms-assets.tutsplus.com/uploads/users/1500/posts/31260/image/summer_nature_background_with_green_grass_and_butterfly_and_blue_sky.jpg');
}
But with replacing the category ID.
You can find the category ID either by inspecting or from the backend.
Screenshot:
Hope this helps.
Regards!!
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |