WordPress is a versatile open source software which can be used to make many different kinds of websites. Some of the popular implementations of WordPress include a blog, a content management system and even a ecommerce website. WordPress is easy to use if your want to set it up yourself.
There are ready made templates available and even extra plugins available that can be downloaded and installed onto your system with ease. There are even several special articles like this one that explain how to do the tough stuff by simply following the instructions provided. In this article we however describe how to add a widget to your WordPress website.
There are many of us who desire more from their website but don’t really have the expertise to do themselves. In such a case it becomes necessary for your to take help of the professional WordPress web developers. Alakmalak is one such WordPress web development company that offers many different services and is capable of helping you with your WordPress issues however big or small they may be.
It is possible to add a widget area to your WordPress Website. Simply follow the steps mentioned below in order to do so.
- You need to first login to the web server of your WordPress installation via FTP.
- Once your are logged in navigate to the folder wp-contents/themes/<your theme> and located the file functions .php
- Download this file and open it in your favourite editor.
- Using the search tools present in your editor search for the text ‘widget’ till you come across some think like the code mentioned below:
- //Widget and Sidebar
- require_once $includes_path . ‘sidebar-init.php';
- Now the code may vary from template to template and it is possible that you do not have the above code in your file
- The next thing to do (either in the sidebar-init.php file if your found it or in the functions.php file itself) is to look for the following mentioned code.
- You can enter the code for your new widget lie this:
- ‘name’ => ‘Sidebar 2′,
- ‘id’ => ‘Sidebar-2′,
- ‘description’ => __(‘Located at the right side of pages.’),
- ‘before_widget’ => ‘<div id=”1$s” class=”widget %$s”>’,
- ‘after_widet’ => ‘</div>’,
- ‘before_title’ => ‘<h3 class=”widget-title”>’,
- ‘after_title’ => ‘</h3>’,
- Now you can insert the widget area to any part of your template. This can be inserted to anyone of these files mentioned below generally located in your theme directory
- header.php, footer.php, single.php, category.php, index.php, sidebar.php
- This new widget should then be available from admin section of your WordPress panel; Appearance >> Widget.
- Once inserted on the sidebar it should be visible on the front end as well.
Alakmalak is on such WordPress Web Development company that is involved in WordPress web development and can help you out with tasks big and small.