I’m trying to find out how to style only the category widget. All widgets are using the same div names. Is there a code I can use to differentiate the category widget?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your theme should enclose widgets in some tag with a class unique to that widget. Look at the documentation for register_sidebar for how to specify the before_widget property to do so:
http://codex.wordpress.org/Function_Reference/register_sidebar
Failing that, if the widget doesn’t have any unique selectors you can target, then you’ll have to create them. If you’re going to edit a built-in widget, I recommend copying its code into your functions.php rather than editing it in place, so that upgrading WordPress doesn’t remove your modifications. Just register the widget with a different name.