Simple widget enhancer : css classes and title link




Style and title url inputs have been added to the widget form, example above on the text widget form




There are all sort of widget types for WORDPRESS that give web masters a lot of flexibility over the layout of sidebars, headers, footers. Among   many attributes of the register_sidebar function, the basis of zone creation in wordpress pages, are the before/after_widget and before/after_title.

While these attributes can specify specific classes and code for all widgets of a specific page area, the default widget system does not take care of specific elements within the sidebar : each widget should be allowed to be designed independently, via custom classes for instance.Further more, we like to keep the preformatted title (via before/after_title settings), but we find it necessary to be able to link that title. That's what we do below, extending the original custom classes feature to incorporate a title url link input. This code comes into an include of your functions.php theme and should work as is





0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *