Return to Candy by James homepage

How to fix your WordPress 2.0.1 feeds

If, like me, you waited to update your WordPress install­a­tion until 2.0.1 came out, you might have noticed that your art­icle feed turned into a com­ment feed. Which, as we can see from the fol­low­ing pic­ture, is rather det­ri­mental to your vis­itor figures:

It’s worth not­ing this doesn’t hap­pen to every­one — just to people who have index.php in front of their permalinks. The fix for this prob­lem is included in 2.0.2, but it’s a bit silly to have to wait until it comes out. Luckily there’s an easy two-step solu­tion to the problem:

1) As per the instruc­tions at Trac Bug Ticket 2379 :

Open the file ‘classes.php’ in your wp-includes/ folder. Find line num­ber 1321; it should look like this:

// Root
(blah blah)

// Comments
$comments_rewrite = $this->generate_rewrite_rules($this->root . $this->comments_base, true, true, true);
$comments_rewrite = apply_filters(‘comments_rewrite_rules’, $comments_rewrite);

That first line in the com­ments sec­tion (in bold) needs another ‘, false’ behind it. That means it should end up like so:

// Comments
$comments_rewrite = $this->generate_rewrite_rules($this->root . $this->comments_base, true, true, true, false);

2) Now go to your ‘Options’ panel in your WordPress admin centre. Click on the ‘permalinks’ tab. If you’ve chosen the 4th option, copy your cus­tom struc­ture to clip­board (ctrl+c). Select the 1st option. Click ‘update permalink struc­ture’. Now select your ori­ginal option again. If it the 4th, put your cus­tom struc­ture back in again. Click ‘update permalink struc­ture’ again. Or, because an image speaks a thou­sand words:

That’s all there is to it!

Update: WP 2.0.2 is out, and the fix is indeed included. Remember to use the spe­cial upgrade pro­ced­ure — it’s a quick delete/move & upload this time!

Have a look at more Code or Web

Possibly related content

  1. WordPress 2.0 & K2 Beta
  2. Improve your WordPress: related posts for 404’s
  3. Hierarchy and Focal Point
  4. Candy: rebooted
  5. Fat nano?