1

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.

2

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.

  • @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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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