Hello,
Is there any way to have the currently selected product category highlighted in the product category widget?
Best,
Michael
Hello,
Is there any way to have the currently selected product category highlighted in the product category widget?
Best,
Michael
Hello,
You can style it with
li.current-cat {
background-color: #CCC;
}
Regards,
Ismael
Thanks, this works for adding a background color to the selected category. However, I should have been more clear. I am actually trying to style the TEXT of the selected category that is inside the tags.
I tried the following and it has no effect:
li.current-cat a {
color: #000000;
}
I also tried:
li.current-cat a {
color: #000000 !important;
}
Unfortunately this not only applied the style to the selected category but to all of the child categories as well. Not good.
Any ideas?
Thanks.
Michael
Hi Michael,
Using:
li.current-cat a {
color: #333 !important;
}
Worked for me. Can you provide a link to your page as there might be something else modifying the css that we aren't seeing.
Regards,
Devin
Yes. However, the site is password protected. Please let me know how I can send you the link and login credentials.
Hey!
Try to use following code instead:
.widget_product_categories li.current-cat {
color: #333 !important;
}
Best regards,
Peter
Hi Peter,
Unfortunately that doesn't work either.
The issue is that when a parent category is selected, all the child categories of that parent are also automatically selected when only the parent category should be selected.
Any further suggestions?
Best,
Michael
Hi Michael,
I think we're going have to look at your website in order to solve this. If you will send me an email at mya (at) myaleigh.com and I'll take a look. Please include a link to this thread so my spam filters won't grab.
Regards,
Mya
Hi Mya,
I sent an email to you 3 days ago. Could you please confirm that you received it. Is there any update?
Thanks.
Michael
Hello,
Let me tag Mya. Still working on your problem with sidebars.
Regards,
Ismael
Thanks for the tag Ismael!
Hi Michael,
Your email got re-directed into a folder I didn't check until I saw Ismael's tag. Sorry about that. I took at look at the CSS via Firebug and I think this might work but since I don't have access to your custom.css I can't test for myself.
li.current-cat a {
color: #000000 !important;
font-weight: bold;
}
li.current-cat > li.cat-item a { color:#919191 !important; font-weight:normal !important; }
Regards,
Mya
Hi Myla, I tried your suggestion but no luck -- the sub-categories are all still highlighted. I can email you my custom.css if that would help. Please tell me where to send it. Thanks.
Hi michaelspencer,
I think what Mya meant is that she couldn't add the code your custom.css though anyone viewing the site has access to see it.
When you added the above to you try refreshing your page a few times to make sure you aren't looking at a cached copy of the content. That would make seem like the change did nothing but really you aren't seeing the new css.
Try adding it back in if this is the case and then give your page 3-5 hard refreshes.
Regards,
Devin
Hi Devin and Mya,
Unfortunately, this latest suggestion still doesn't work. I have cleared my browser cache, I have hard-refreshed my page several times. I have tried it in both Safari and Firefox and all the sub-categories are still highlighting in both browsers.
Are you able to get this to work on your local copy?
Best,
Michael
Hi Michael,
I'm not sure what else to try then. I'll re-tag Mya on the topic as she tends to be a bit more sharp with these kinds of things and already has your login info to view the site as it is live.
Regards,
Devin
Hi!
Thanks for the re-tag Devin. Michael I'll take a look again and get back with you.
Regards,
Mya
Hi Michael,
I logged into your website and added an altered version of the CSS I gave you above to the Quick CSS box under Theme Options > Styling. I believe it does what you want now. If so, copy that over to your custom.css.
Here's the code for anyone else who needs it:
li.current-cat a {
color: #000000 !important;
font-weight: bold;
}
li.current-cat ul.children li.cat-item a { color:#919191 !important; font-weight:normal !important; }
Regards,
Mya
Hi Mya,
CONGRATULATIONS!! You did it. That works like a charm. Thank you very much. :-)
Best,
Michael
Hi Michael,
Excellent. Glad we got it to working.
Regards,
Mya
This topic has been closed to new replies.