BACK TO DIRECTORY

Widget CSS Classes

by Jory Hogeveen

4.9
(74 ratings)

Widget CSS Classes gives you the ability to add custom classes and ids to your WordPress widgets

Please note that this plugin doesn’t enable you to enter custom CSS. You’ll need to edit your theme’s style.css or add another
plugin that allows you to input custom CSS.

This plugin also adds additional classes to widgets to help you style them easier:

  • widget-first: added to the first widget in a sidebar
  • widget-last: added to the last widget in a sidebar
  • widget-odd: added to odd numbered widgets in a sidebar
  • widget-even: added to even numbered widgets in a sidebar
  • widget-#: added to every widget, such as widget-1, widget-2

Features

  • Adds a text field to a widget for defining a class
  • You can specify multiple classes by putting a space between them
  • Optionally adds checkboxes with predefined classes
  • Optionally adds a text field to add an id to a widget
  • Adds first and last classes to the first and last widget instances in a sidebar
  • Adds even/odd classes to widgets
  • Adds number classes to widgets
  • Fully translatable
  • Multi-site compatible
  • Compatible with Widget Logic, Widget Context, and WP Page Widget plugins
  • Has filters and hooks for customizing output including class names

Plugin Website

Credits

Translation Contributors
GitHub Contributors

Screenshots

Basic Widget

Basic Widget

Widget with ID field and Predefined Choices

Widget with ID field and Predefined Choices

Settings Page

Settings Page

Generated HTML

Generated HTML

Plugin Details

Active Installs
80K+
Total Downloads
1,135,756
Version
1.5.4.1
Requires WP
3.3
Requires PHP
5.2.4
Tested Up To
6.7.7
Added
2012-07-16
Last Updated
2024-11-12 12:16am GMT

Ratings

5
70
4
3
3
0
2
1
1
0