跳到内容

Widget CSS Classes

v1.5.4.1

Jory Hogeveen · 2012年7月16日 上架

Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.

正在使用
8 万+
评分
4.9 / 5
累计下载
114 万
最近更新
2024年11月12日
74 条评价需要 WordPress 3.3+已测试到 6.7.12PHP 5.2.4+

截图

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

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

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums