I think this might be a really simple problem, but I just don't know exactly what and where to enter the specific code and before I mess up, I thought it's better to ask for help here.

I was able to create multiple columns to display the latest posts. For that I created a category.php and tried it out there as I didn't want to mess up my index.php.

Now I quite like it and would like to use the same style for my actual category view as well. However, the current php code is meant to be for the normal Wordpress loop, so naturally only the latest posts are displayed, but they are not sorted by category, even if I click on the category link, e.g. category/uncategorized.

It's probably done with some kind of "if" command, but I'd really appreciate if somebody could help me.

My category.php looks like this right now: http://pastebin.com/69VXxytK

My website: zoomingjapan.com

Also, I'd like to have something like this for my front page: here I think I already know how to do it except for where to put the command which category should be shown.

1 Answer 1


The sorting by taxonomies is strongly discouraged by design.

From your image I think that what you want is multiple secondary loops per category is what you want, and your code does have something like that - except that you are overusing query_posts() in a way it should not be used.

Basically read up on loops a bit, you don't seem to have problem with idea/approach but rather with implementation.

  • Actually I have a HUGE problem with implementation. I read all about loops, but I just don't seem to get how to do it. I've tried for several hours and days (today again) and no matter what I try, it doesn't work. I'm about to give up. Thanks for your comment, though :)
    – japanworm
    Commented Aug 26, 2011 at 3:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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