This tutorial will explain how to insert several widget area in your Wordpress theme.
This method is not the only one, and it is for a ‘real’ wordpress hosted.

There is two part for doing this:

1. Adding or changing the widget function in the file functions.php inside your theme folder.

if (function_exists(‘register_sidebars’)) register_sidebars(8, array(‘before_widget’ => ,‘after_widget’ => ));
 

Note: Use only single quotes in this code. 8 is the number of widget to be created!

2. Insert the widget code exactly where you want it.
Tip: respect div … /div tags

<?php
if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(1) )
 : else : ?>
<!–// Place your code here : Html, Javascript…
If php use tags <?php?>  //–>
<?php endif; ?>
 

This code is for widget 1! change numbers for other widgets.

This method allows to

  • create widgets anywhere you want. especialy in pages

  • You can keep the css design for title in your sidebar!

Useful tip if you do not use and ad publishing platform, you can use a custom code to show 2 ou 3 ad network randomly.
Well it up to you to decide what to do with this…