Dec 09, 2009
I built custom widgets in wordpress
So as I said before, I’m building a wordpress theme for a few blogs. This is one theme that will be used for several blogs, mind you.
I didn’t want to make the css stylesheet since the design is going to be the same, but just on wordpress and not typepad. Therefore, I’m using the same stylesheet except “wordpressing” it. Despite my efforts to stay with the default widgets, I needed more customization for the css. Now generally, you can specify what tags you want in a widget (before/after title, before/after widget) but you can’t target a single widget with specific tags. What applies to one default widget, applies to the rest. The design just isn’t built that way unfortunately.
This led me to making my own, because I need that ability to put different div id/classes into the widgets. To keep the theme as together as possible, I’ve been abusing the include() function and storing the “templates” for the widgets in my theme folder.