Jan 11 2009

How to Show Empty Categories in Wordpress 2.7

Here’s an update of how to show empty categories using the default Category widget in Wordpress 2.7.  My previous post was for pre-2.7 Wordpress sites, this update is still simple; actually it’s easier since Wordpress switched to using an array for the category arguments. Continue reading


Aug 19 2008

How to show empty categories in Wordpress using the default category widget

This is a hack, but a simple one.  Surprisingly enough, Wordpress 2.3 doesn’t have an option in the default category widget to show empty categories.  Personally I prefer to only show categories that have posts, but here’s a really simple way to do it.

If you are not using widgets, use this to call the list category function with the proper parameters in sidebar.php or whatever file you’re using to display the categories:

$args = “hide_empty=0″;
wp_list_cats($args);

If you are using widgets, it’s just as easy,  open /includes/widgets.php and search for “$cat_args” (should be around line 627 or so).  Change this line:

$cat_args = “orderby=name&show_count={$c}&hierarchical={$h}”;

to

$cat_args = “hide_empty=0&orderby=name&show_count={$c}&hierarchical={$h}”;

I’m sure there is a simple way to change the properties of the default category widget to  allow you to set that parameter through the widget UI, but this works great and doesn’t cause any problem using widgets.


Apr 16 2008

How to manually change your Wordpress theme

I was working on another blog tonight and for some reason the theme I was using had a problem with widgets.  Soon as I changed a setting in options, I’d get a PHP error which was pretty annoying.  I couldn’t get into the admin at all and figured out a simple way to update the theme manually to at least be able to get into the admin.

The theme being used is stored in the wp_options table in the database.   Simply run these MySQL scripts and your site will be set to using the default theme (it’s based on the theme folder name):

update wp_options set option_value = ‘default’ where option_name = ‘template’
update wp_options set option_value = ‘default’ where option_name =’stylesheet’

Hopefully that’ll save you some time ripping your hair out if you stumble on a theme that trashes your admin.


Feb 24 2008

Post from Wordpress to Facebook

Here’s step by step instructions for how to automatically display your Wordpress posts on your Facebook profile page. It’s very simple to setup, but for some reason Facebook doesn’t include this on your profile edit screen. My next Wordpress tip will be about adding chicklets to your posts so your site visitors can share your posts to their friends through Facebook, Technorati and a bunch of other social network sites. Enjoy! Continue reading


Feb 16 2008

How to Exclude Category Posts from your Wordpress Homepage

I recently updated my template for my blog (thank you Joern Kretzschmar) and started using Wordpress’ bookmarklet feature to post quick news from sites I like to visit. I didn’t want these bookmarklet posts to show up on my homepage and here is a really simple way to accomplish it. If you’re not technical, don’t worry, it’s really simple. Continue reading


Feb 12 2008

How to post your Facebook status on your Wordpress blog

Thanks to Adam Walker Cleaveland for this cool Wordpress plugin. I use this on the right rail of my blog and it works great. It’s very simple to install. Simply add the plugin, enabled it and copy a line of code into your template.

Adam has all the detailed instructions and the plug-in is available for download on his site.