Wordpress Archive
28th January 2007 11:08pm
Here’s how to code your own “Most commented” widget for your self-hosted Wordpress site, without the need for a single plugin. See my left sidebar for an example (”Popular Posts”).
First, find the .php files that are part of your template. They are normally in wp-content\themes\<your theme>, whatever <your theme> might be. You’ll probably want to put the widget in your sidebar, so a lot of themes probably have a sidebar.php file. Open it up in your preferred text editor.
I’ll explain the MySQL query first. Then I’ll add a bit of PHP around it, and wrap it all together at the end.




















