Inserting Widgets From Elsewhere

I have a wordpress theme which is does not have the widgets that I need.

I found a few themes that have the widgets that I want.

How do I take those widgets and move them (or integrate them) into my main (or active) theme that I am using?

All the themes are wordpress themes but from different vendors.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
>> How do I take those widgets and move them (or integrate them) into my main (or active) theme that I am using?

If the widgets are indeed part of the theme then look in the functions.php file for the code for them...that's the typical place.  You are looking for something like this:

class My_Widget extends WP_Widget {
	function My_Widget() {
		// widget actual processes

	function form($instance) {
		// outputs the options form on admin

	function update($new_instance, $old_instance) {
		// processes widget options to be saved

	function widget($args, $instance) {
		// outputs the content of the widget


Open in new window

source: WordPress Codex

Once you have that code, you should be able to move it around.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smuralisankarAuthor Commented:
I mean moving the widget from one theme to another and not just within the them.
Jason C. LevineDon't talk to me.Commented:
Yes, I know.  The answer still stands.  You have to be able to identify the code for the widget in question and copy/paste into the other theme if it is hardcoded into the theme.  If the widget comes from a plugin, then just install that plugin in other theme.
Sam CohenConsultant to Digital/DeveloperCommented:
What kind of widgets?
send example please
smuralisankarAuthor Commented:
Any kind of widgets. Sidebar or footbar widgets.

Examples: twitter stream widgets, tabs (for latest and popular posts, and most commented posts), custom menu.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.