Import your demo content, widgets and theme settings with one click. Theme authors! Enable simple theme demo import…
About Widget CSS Classes
Widget CSS Classes is a WordPress plugin that allows you to add custom classes and ids to your widgets. It also adds additional classes to widgets to help you style them easier. Please note that this plugin does not enable you to enter custom CSS.Screenshots




Frequently asked questions
What is Widget CSS Classes?
Widget CSS Classes is a WordPress plugin that allows you to add custom classes and IDs to your widgets. It also automatically adds classes like widget-first, widget-last, widget-odd, widget-even, and widget-# to help with styling.
Can I add custom CSS with this plugin?
No, this plugin does not enable you to enter custom CSS. You will need to edit your theme's style.css file or use another plugin for custom CSS input.
What are some key features of Widget CSS Classes?
Key features include adding a text field for defining custom classes and IDs, support for multiple classes, and optional predefined class checkboxes. It also automatically adds first, last, even, odd, and numbered classes to widgets.
Is Widget CSS Classes compatible with other plugins?
Yes, Widget CSS Classes is compatible with Widget Logic, Widget Context, and WP Page Widget plugins. It also includes filters and hooks for customizing output.
Is the plugin translatable?
Yes, Widget CSS Classes is fully translatable. Translations are available in languages such as Slovak, Polish, Spanish, Serbo-Croatian, Dutch, Russian, and Swedish.
Changelog
1.5.4.1
- Tested with WP 5.5.
- Update plugin owner.
1.5.4
- Compatibility: Fix for old single widgets (remove notice). #37 (props @westonruter)
- Tested with WP 5.2.
1.5.3
- Compatibility: dFactory Responsive Lightbox widget option. #33
- Tested with WP 5.0.
1.5.2.1
- i18n: Remove sv_SE translation from the plugin directory. It’s 95% on translate.wordpress.org and accepted as the better version. #23
- Documentation: Readme & Wiki. #31
- Compatibility: Tested with WordPress 4.9
Detailed info: PR on GitHub
1.5.2
- Enhancement: Make translations of core widget classes optional instead of default. #29
- Enhancement: Allow vertical resize of defined classes box for CSS3 compatible browsers.
Detailed info: PR on GitHub
1.5.1
- Fix: Widget Logic
widget_contentfilter compatibility. #27 - Enhancement: Make uninstall script compatible with network installations.
1.5.0
- Feature: Option to try and fix the widget parameters if they are invalid. #24
- Feature: Option to remove duplicate classes. #25
- Enhancement: Sort classes based on the predefined classes on the frontend by default. #19
- Enhancement: Classes filter for frontend (for sorting or modifications). #19
widget_css_classes: modify all classes added by this plugin.widget_css_classes_custom: modify custom input classes.
- Enhancement: Plugin settings filter (
widget_css_classes_set_settings), overwrites user settings. #16 - Enhancement: Plugin default settings filter (
widget_css_classes_default_settings). #4 - Enhancement: Capability filters for form fields. #21
widget_css_classes_id_input_capability: ID inputwidget_css_classes_class_input_capability: classes inputwidget_css_classes_class_select_capability: predefined classes select (also hides classes input if invalid)
- Compatibility: WP External Links. #17, thanks to Victor @freelancephp
- Fix: Form wrapper div style. #18, thanks to Chuck Reynolds @ryno267
- Fix: Enable sortable input selection (IE-11 fix). #20
- UI: Enhance setting page JavaScript and remove relCopy library dependency.
- i18n: Remove Dutch and Russian languages from plugin distribution (available on translate.wordpress.org). #23
- Started using TravisCI and CodeClimate. #15
Detailed info: PR on GitHub
1.4.0
- Feature: Sort Pre-defined classes (thanks Jory Hogeveen)
- Security: Prevent unauthenticated import of settings
- Fix: Notice message when classes is empty (thanks Jory Hogeveen)
1.3.0
- Feature: Change dropdown to checkboxes for multiple class selection
- Feature: Option to use both predefined and text input classes
- Feature: Migrate classes when predefined classes are available
- Improvement: Do not show previously defined classes that are removed in the settings page when a widget is not updated yet
- Fix: Only show stored classes if the field-type in the setting page is correct
- Fix: When predefined is selected, show previous text input classes if they are defined
- Fix: Ids index notice
- i18n: Added Dutch translation by Jory Hogeveen at Keraweb
- i18n: Added Russian translation by Наталия Завьялова
- i18n: Added Swedish translation by Olle Gustafsson
1.2.9
- Changed h2 to h1 on settings page
- Changed plus/minus icons on settings page to dashicons
1.2.8
- Added text domain to plugin header in preparation for automatic language translations
1.2.7
- Changed class and ID fields to full-width
- Added missing escaping from settings page
- Enqueue admin scripts on correct hook
- Fixed undefined notice when option was not found
1.2.6
- Fixed error notice
1.2.5
- Fixed notice
1.2.4
- Added Serbo-Croatian translation by Borisa Djuraskovic at WebHostingHub
- Added support for WP Page Widget
1.2.3
- Added Polish translation, Slovak translation files renamed by Tomasz Wesołowski
- Added Spanish translation by Maria Ramos at WebHostingHub
1.2.2
- Fix for notice on line 103 when using Widget Logic
- Tested with WordPress 3.7 beta 1
1.2.1
- Added Slovak translation by Branco WebHostingGeeks.com
- Updated Widget Context compatibility fix plus notice fix by Joan Piedra
- Changed jQuery live to on for 1.9 compatibility
1.2
- Replace ID with custom ID rather than appending to existing ID
- Added settings to not show numbered widget classes, first/last classes, and even/odd classes
1.1
- Added support for Widget Context plugin
- Fixed notices appearing when Widget Logic plugin was enabled but filter was disabled
- Added Hide option for the Class Field Type in Settings
- Don’t show any previously added IDs in front end if Show Additional Field for ID is set to No
- Don’t show any previously added classes in front end if Class Field Type is set to Hide
1.0
- First version
