Linux 软件免费装
Banner图

Widget CSS Classes

开发者 keraweb
elusivelight
更新时间 2024年11月12日 08:16
捐献地址: 去捐款
PHP版本: 5.2.4 及以上
WordPress版本: 6.7
版权: GPLv2 or later
版权网址: 版权信息

标签

css widgets classes widget classes widget css

下载

1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.5.1 1.2.3 1.2 1.2.1 1.2.2 1.0 1.4.0 1.5.0 1.1 1.5.2 1.5.2.1 1.5.3 1.5.4 1.5.4.1

详情介绍:

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: Features Plugin Website

安装:

  1. Upload the folder /widget-css-classes/ to the /wp-content/plugins/ directory
  2. Activate the plugin through the Plugins menu in WordPress
  3. Configure the settings under Settings > Widget CSS Classes
  4. Visit Appearance > Widgets to add or change the custom classes and ids for a widget.
  5. Expand the appropriate widget in the desired sidebar.
  6. You'll see a field labeled CSS Class. Depending on your settings, this will be a text field and/or checkboxes.
  7. If you are using the text field you can enter multiple class names by separating them with a space.
  8. If you've enabled the id field, you will see a text field called CSS ID.

屏幕截图:

  • Widget with ID field and Predefined Choices
  • Settings Page
  • Generated HTML

常见问题:

Why aren't the classes showing up in my widget?

You need to make sure you have an HTML element defined for before_widget and after_widget in your active theme's register_sidebar functions, usually located in your theme's functions.php (/wp-content/themes/yourtheme/functions.php). This HTML element must have class and id attributes. This plugin will not work if before_widget and after_widget are blank. Example: register_sidebar( array( 'name' => 'Sidebar', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>' ) );

How do I add the CSS for my custom class?

There are two ways:

  1. Edit your theme's style.css file (usually located in /wp-content/themes/yourtheme/).
  2. Use a plugin such as Simple Custom CSS.

How I export the Settings?

You can export the Settings from Settings > Widget CSS Classes > Import/Export.

What should I do if I find a bug?

Please file a bug report on GitHub.

更新日志:

1.5.4.1 1.5.4 1.5.3 1.5.2.1 1.5.2 1.5.1 1.5.0 1.4.0 1.3.0 1.2.9 1.2.8 1.2.7 1.2.6 1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.2 1.1 1.0