Home > WordPress Newbie > How to add widget at foot

How to add widget at foot

April 30th, 2009 Leave a comment Go to comments

First , find the theme folder and open the file named functions.php

1
2
3
4
5
6
7
   if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));

add the below code at this file’s bottom

1
2
3
4
5
6
7
8
9
10
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
    register_sidebar(array(
          'name' =>'subwidget',
   ));

then, add the below code at your foot.php

1
2
3
<div class="subwidget">
	<?php dynamic_sidebar(subwidget) ?>
</div>

OK now :-)

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Categories: WordPress Newbie Tags: , ,
  1. May 3rd, 2009 at 12:17 | #1

    This a very interesting blogg. Like most other bloggs comments can get stale but not this one.

  1. No trackbacks yet.

Powered by Yahoo! Answers