Someone asked how to accomplish a certain design element via a widget. When I mentioned that they can add some div tags to their widget, they told me that they only use CSS in widgets.
Is there a problem using HTML in a widget? I’ve always used CSS and HTML in my widgets and have never heard that you shouldn’t do this. But if I’m wrong, please let me know, and I’d like to know why.
You’re right. I use HTML in text widgets all the time. I’d actually be less likely to use CSS in a widget.
I’m sure there are widgets for various plugins and things that may get pretty well messed up by throwing HTML in, and with others you may find that they strip out your HTML.
But yes, it’s very possible. Just avoid putting PHP in there.
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
Awesome, that’s what I wanted to know. Thanks. I use text widgets quite a bit, so this surprised me when someone said this to me. Whew!
The chicken is relieved. I repeat. The chicken is relieved!
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.