Friday, November 21, 2008

Hack WordPress

Hack WordPress

How To: Display WordPress Categories without Children

Posted: 21 Nov 2008 02:00 AM CST

About a week ago I decided I was unhappy with the archives plugin I was using to display our archives, so I decided to build a custom archives page.   This archives page is fairly basic in that it displays the categories and archives side-by-side, then all the posts below it.   This way people can use Ctrl+F to quickly find posts they are looking for. 

After getting the page built, I realized all of the “child” categories I use for the WordPress Hacks theme was causing some problems, so I decided to remove them from the display.   After all, these posts can also be found in their parent category. 

If you are displaying your categories somewhere and would like to remove the children, here is the code you’ll need (for WordPress 2.5+):

<?php wp_list_categories('title_li=&depth=1&show_count=1') ?>

The depth=1 is the important one for the purpose of this hack as it is what tells WordPress not to display more than your parent categories.   By default, it is of course set to depth=0 (shows all categories).   If you are wondering what other options you have, here is what the WordPress Codex lists for the depth parameter:

  • 0 - All Categories and child Categories (Default).
  • -1 - All Categories displayed in flat (no indent) form (overrides hierarchical).
  • 1 - Show only top level Categories.
  • n - Value of n (some number) specifies the depth (or level) to descend in displaying Categories.

Related posts:

  1. How To: Display the Recent Posts of Specific Categories
  2. How To: Display WordPress Categories in a Horizontal Drop-Down Menu
  3. How To: Hiding Your Sub-Categories in WordPress
  4. How to: Display your WordPress Tags in a Drop-Down Menu

Will the WordPress 2.7 Core Update Feature Work With My Web Host?

Posted: 20 Nov 2008 03:38 PM CST

One of the most anticipated new features with WordPress 2.7 is the new core update feature which will automatically update your WordPress installation, removing the tedious process of installing the software yourself or waiting for Fantastico to update with the latest version of WordPress. 

However, this new feature is not necessarily compatible with every web host, so it looks like the WordPress community has created a very nice list of Web Hosts that the Core Update Feature is Compatible With.   It probably won’t affect whether you upgrade or not, but you can check this list to confirm your web host is included.

Related posts:

  1. What Plugins Are Compatible With WordPress 2.7?
  2. Quick Update on the WordPress 2.5 Release Candidate
  3. Web Hosts That Support Installing WordPress Via Fantastico
  4. Upgrading WordPress with Fantastico

What Plugins Are Compatible With WordPress 2.7?

Posted: 20 Nov 2008 03:08 PM CST

Due to the number of changes in WordPress 2.7, it is likely that once it is released, a number of people will quickly upgrade only to find that there theme is now broken or some plugin they rely upon no longer works correctly.   

Fortunately, thanks to the availability of WordPress 2.7 beta, many plugin authors have gotten a jump on making their popular plugins compatible (or were able to confirm their plugins work fine with WordPress 2.7), and have been compiling a huge list of WordPress plugins which have been confirmed to be compatible with WordPress 2.7.   If you plan to upgrade around release time, you’ll first want to determine which plugins you can’t live without and verify they are all included on this list.  If any aren’t on that list that you need, you’ll want to hold off on upgrading. 

Note: You can now also confirm compatibility of some WordPress themes as well.

Related posts:

  1. How To: Optimize Your Theme for WordPress Plugins
  2. Will the WordPress 2.7 Core Update Feature Work With My Web Host?
  3. How To: Creating a WordPress Directory
  4. Best WordPress Plugins

Post a Comment
Related Posts Plugin for WordPress, Blogger...

Popular Posts