WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
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 Aug 26 '11 at 3:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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