Free Business Consulting

How to add an additional widget in WordPress?

adminPHPWordpressWordpress EcommerceWordpress Plugins0 Comments

Manier times when you are developing site at that time you come across requirement for adding new(extra) widget in the wordpress admin panel. So I did some RnD and found a very quick and easy way to add new(extra) widget in wordpress admin panel.

This kind of requiremnt arise when the design has many small modules and each page contain different modules and client want those module to be user friendly. So now it won’t be headache for you and your client. 🙂

Go to your theme folder and find functions.php in your theme folder.

Now find thie piece of code in functions.php. This will be around 429 line no of twentyten theme. 🙂

Code for Adding Additional widget in WordPress :

Now add this code just below above code.

You are done !! 🙂

You can see that we just have copied the default widget code and replaced some of the ids and name of the widget in the code. You can add as many widgets as you want by repeating the above code and replacing the name and ids.

After adding this in your function.php, in admin, you can see one sidebar block in widget.

Now How to show this particular sidebar in template ? Its also an easy task. Open template file (you can also put this in page.php).

And place below code in at location where you want to show that widget:

Thats it !! You can add as many widgets as you want in your site. You can make unique look.

If you have any doubt or any query then comment on this or you can directly contact me via contact form.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get News In Your Inbox

Popular Blogs

How to create callback functions for jQuery plugins & extensions?

Most of the time custom jQuery plugins and extensions that we create do not use callback functions. They usually simply work on DOM elements or do some calculations. But there…

Continue Reading
Top 5 Best Ecommerce plugins in WordPress

Nowadays online shopping has increased and become very convenient shopping place for users, you may be wanting to start your own online shop so you can unleash your products to…

Continue Reading
10 Best WordPress Live Chat Plugins for Customer Support

The Live chat is the common thing now days, if you own any eCommerce website or if you are the service provider. It makes easy for your customers to contact…

Continue Reading
Free plagiarism checker sites

Plagiarism is the process of taking someone’s ideas & work and passing them off as one’s own. Prevent Plagiarism to check originality of content is the most important factor for…

Continue Reading
How to show wordpress posts in other CMS?

Currently since from few weeks, I am working on Expression Engine. Now you thought that what is Expression Engine. Now let me explain you in little brief. Expression Engine is…

Continue Reading

Remarkable Facts About Us

0 %
Client satisfaction
0 +
Years of Experience
0 +
Happy Clients
Projects Accomplished

Ready to Get Started ?