Sidebar Widgets – To get the most out of it
I had the sidebar widgets plugin installed on my wordpress system since day 1 but I never really figured out to use the juice of it until tonight.
I had did not know how to add my own widgets within the dynamic sidebar, which is why all add-on items such as my Google ad, John Chow’s Widget, MyBlogLog Avatar plugin and what not were taking on the top only, never in the middle. But today I went down to work and discovered that adding new widgets to the sidebar in both PHP and HTML is rather simple. Here is a brief explanation for those who are more code-savvy.
- To add sidebar items that consist of Javascript/HTML/Text only
Simply go to the plugin options page in your admin panel (under Presentation) and add a text-widget. To define the # of text widgets available, scroll down below. I just have this to the maximum # which is 9, in order to have flexibility to add more stuff.

For any HTML/Javascript/Text sidebar items, simply use this option. It’s easier.
- For PHP, you need to add a sidebar widget in the plugin PHP file, which you can find under (if you installed it this way, of course) wp-content/plugins/widgets. In that file, scroll to near the bottom where you see a bunch of functions being added.
My first widget of choice was the Top Commentators Widget. This widget shows you the top commentators, of course.

This widget was installed using generic PHP code given by the authoer, and now it is an item that I can drag-and-drop to re-arrange on my Wordpress Admin section.
Here’s how I created the code, in case you want to copy me :
function widget_topcommentators($args) {
extract($args);
?><?php if(function_exists(‘ns_show_top_commentators’)) { ?>
<li>
<h2>Top Commentators</h2>
<ul><?php ns_show_top_commentators(); ?></ul>
</li>
<?php } ?><?php
}
register_sidebar_widget(‘Top Commentators’,'widget_topcommentators’);
So now, I have completely control over my sidebar widgets, whether it be a Javascript item or a PHP item. And my sidebar is all cleaned up now!!!




(4.67 out of 5)
I place the code in sidebar that already it exists or make another one. I placed in sidebar that it exists and of the error.
you’re gonna have to write that again. Sorry, i can’t understand it.