Adding class to a widget, similar to custom menus – plugin for this?
-
I recently discovered that you can add a individual class to any menu item in the custom menu backend, and it will appear in that menu entries class tag on your website. Pretty awesome.
I have long wondered if there was a way to do this for widgets. Often, I have a widget of some sort that I want to style in a unique way, but I have to add the widget, and then go to the website and see what ID WP has assigned it, for instance a text widget might be assigned:
id="text-3"
But if you were to style the widget based on this ID, and then move the site to a new location, such as having a development install and a production isntall, the widget ID may be different.
Is there any plugin available that adds a little ID field to each widget so you can style them on a individualized basis, without having to publish the widget first and see what WP assigned to it?
- The topic ‘Adding class to a widget, similar to custom menus – plugin for this?’ is closed to new replies.