Category background image -> hide on single posts

Posted in: Newspaper
Post count: 14

Hi there,

I’m using a boxed layout. I went through considerable effort to design background images to be used on the category pages. Now I noticed that the same image is used on every single post of the category and it looks horrible. How can I disable category background image on single posts and keep it on the category (archive) page?

Post count: 20688

Hi,

The posts will inherit the background among other elements from their category, this is known as the primary category
https://forum.tagdiv.com/primary-category/
Post templates that use the featured image as background can overwrite the category background, for example.
This is the way the theme is designed, and it could only be changed by modifying the theme files.

Thanks

Post count: 14

I see. I only found style 8 template that uses featured image as background, so is that the only way?

What about a CSS style override? Like setting background image to none on all single posts? Or using a color layer on top of the image or something?

I found this css class, but the changes I’m trying to make don’t work – what am I doing wrong here (is it wrong class, should I do something else instead):

img.td-backstretch.not-parallax.td-stretch-width {
background-image: none!important;
background-color: #222!important;
}

Post count: 20688

Hi,

Try commenting the highlighted lines of code from this file
https://www.screencast.com/t/RT7WYV6er
The posts should not display the category background after doing this. Clear any caching installed after making the modification, in case nothing changes.

Thanks

Post count: 14

This is working :),

thanks a lot for your suberb help!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.