Stop Wordpress Returning 404 When Accessing Empty Categories

If you’re using Wordpress 2.2.1 — like I am — you might have run into a little problem navigating to a category page that has no associated posts. This was resolved a couple years ago with ticket #1969, but those changes don’t appear to be in my 2.2.1 installation.

It’s a very easy fix: open up wp-includes/classes.php and look for the handle_404 function. Add !is_category() to the main expression and viola! no more 404s for empty categories…

2 Responses to “ Stop Wordpress Returning 404 When Accessing Empty Categories ”

  1. This doesn’t work on 2.3.1… email me if you figure out how o do this eh?

    Regards,
    Ryan

  2. Actually I figured it out… thank you anyway :)

Leave a Reply