Archive

Archive for April, 2009

How to add widget at foot

April 30th, 2009 1 comment

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: , ,

How to disable the post revision

April 25th, 2009 1 comment

If  you use WordPress, you will find it has a very useful function : Revision.

If you update your post, wordpress will generate a revision.

But if you do not like this post, there is tow ways to close this function.

  1. find the file named ‘wp-config.php’, and add the code below:
    define(‘WP_POST_REVISIONS’, false);
  2. Or you can install a wordpress plugin named Revision control. this is a nice way to resolve this problem :-)

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

Powered by Yahoo! Answers