Hello.
I’m working with Craft Ideas, a child theme and Header Style-10, and I’m trying to reach this:
I’ve got 7 categories and I want a different header image depending on which category I’m in (default image for the rest of pages in the site).
I also trying to get a different color for each category for h tags, links and other commun elements.
I’m a PHP programmer, so I could edit the template files if needed. In fact, I was trying several changes in header-style-10.php file.
Could you tell me how to get that?
Thanks in advance!
Hello,
Sorry but our theme does not allow different headers or different accent colors based on the category. these elements are added across the whole site in our themes and not template dependent. You will need to use functions such as
https://developer.wordpress.org/reference/functions/is_category/
to create separate implementation based on categories.
We cannot help in this regard as it represents customization and it’s not covered by the theme support as mentioned in our support policy: https://forum.tagdiv.com/support-policy-2/
Thank you!
Hello Bogdan.
Thanks for replying.
Yes, I’m trying with is_category function in header-style-10.php file with code like
td_util::update_option('tds_header_background_image', my_category_image); but I can’t update the background image.
If you could point me in the right direction, maybe using the API or some hooks… I’d apreciate so much.
Thanks in advance!
Hi,
The background header image is defined in the header template file, each header style has this option I believe
– https://www.screencast.com/t/ZXSBuyyA
You could create conditions for each category, if is category set a background image. I did not try something like that, can’t say if it’s possible or not.
There would be another way of doing it, with some CSS. For example using the category ID
– https://www.screencast.com/t/snAWT51EL0vc
You could set a background image with CSS for each category like that.
From what I know there are plans to provide an increased functionality for the header in the future, so maybe something like this will be possible.
Thanks
Hi Simon.
Sorry to replying so late.
Finally I’ve solved it using CSS cause your first suggestion doesn’t work well for me.
Thanks!