With the help of the internet and you lot, I have been stumbling about to create a worpress site here.

So at this stage, its not exactly a default install. - Im running the boldy theme from Site5. - Have made some tweaks to the underlying PHP, but nothing that I can think that would cause this issue.

Slugs setup normally for categories:

enter image description here

But the URL it takes me too is a 404.


All my categories are broken, except my case studies category.
- This uses a Portfolio template to display posts in that category (part of Boldy theme)

Im sure I had both the 'portfolio' and the other category links working at the same time.

What have I missed?

  • It's not actually taking you to a 404 page or showing a 404 error. It's using the content after the else statement in your template because it thinks there are no posts in the category. Can you add the final version of index.php you went with (from the last question). – Chris_O Apr 28 '11 at 10:52
  • I see. There are 11 posts in the category screencasts. Functions as it stands now: dekho.com.au/Functions.txt – jakc Apr 28 '11 at 10:58
  • functions.php is fine what about index.php? – Chris_O Apr 28 '11 at 11:02
  • dekho.com.au/index.txt – jakc Apr 28 '11 at 12:00
  • It's not using that template. Do you have an archive.php in your theme? – Chris_O Apr 28 '11 at 12:50

Here's what I think is causing the problem:

<?php query_posts($query_string . '&cat=-98, 101, 102'); ?>

should be:

<?php query_posts($query_string . '&cat=-98,-101,-102'); ?>

The way it is now, it's telling WordPress re-run the old query, but give me nothing from category 98, AND only pull posts from categories 101 and 102. I'm guessing you want it to be re-running the original query, leaving out 98, 101, and 102.

  • An easy way to check if this is really the problem is to comment that line out and see if it fixes it. – John P Bloch Apr 28 '11 at 13:27
  • Correct! I should really have picked this one up myself, or at least with a bit of trial and error reverting to backups, seen what change caused this. Thanks loads John. – jakc Apr 29 '11 at 3:06
  • Happy to help! I know it helps me to have a second pair of eyes on really tough bugs. :) – John P Bloch Apr 29 '11 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.