views:

445

answers:

1

I know how to hardcode categories, archives, etc into theme but for one of my projects i would have to hardcode some plugins widgets (especially subscribe2) and i'm not sure how to do this. I know i can add widgets via widgets menu in wp admin, but that's not what i'm trying to achieve, i'm trying to set it up permamently in theme for later reuse. Any ideas how to do this? Especially with subscribe2?

+2  A: 

You can add the widget via the normal means, and check the code on the site using View->Source.

Then, you need to edit the html template for the theme (depending on where you want the widget to appear - main entry, sidebar.html, etc) and add the code there directly.

Abhinav
Wow, I didn't thought about it. I'll try this.
Phil
ok, so... for testing purposed i added widget 'normally' via panel and just below it hardcoded it in a way you recommended. it does work (user is added to subscribed list) but it doesn't show that subscription was successful to user - after reloading there's no thank you message, just the same empty form. any ideas? it does work (i voted your answer up) but i'm afraid that i'll get multiple subscription attempts from users unsure if form is working or not.
Phil