Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a client that wants to use a particular theme without modification, but will likely want to have more widgets than are available with a given theme.

Is there a way to add widgets to the list of those available without modifying the theme?

Thanks.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Yes, you can add widgets through plug-ins the same way you add them through themes. So move the widget code from your functions.php file and drop it inside a custom plug-in. You'll get the same functionality without the need to modify your theme.

share|improve this answer
    
@EAMann: But doesn't the theme need to have code to display the widgets? I don't think putting the widget code in plugins is sufficient, or maybe I'm missing something? –  MikeSchinkel Oct 8 '10 at 13:28
    
So long as the theme has a widgetized sidebar as most current themes do, then there's nothing more you need to do. When a widget is registered by a plug-in, it's automatically added to the list of available plug-ins on the Themes >> Widgets page. –  EAMann Oct 8 '10 at 14:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.