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

With the following code, I do not get the result set ordered by titles. No matter what values I give to 'orderby' and 'order', I get the same ordering. The parameters seem to be ignored (or overridden?) by something else..

Any idea how I troubleshoot this one? Is there a specific filter I should be looking at, that some plugin could be overriding this via?

Should the code below work out of the box? IF it looks correct, something must be interfering.

$args = Array(
    'post_type' => 'post'
    'category_name' => 'reviews'
    'posts_per_page' => '999'
    'orderby' => 'title'
    'order"' => 'ASC'
    'post_status' => 'publish'

$customloop = new WP_Query();

while ($customloop->have_posts()) { ... }
share|improve this question
up vote 1 down vote accepted

I noticed you have an extra quote after order in your args. That affecting it?

share|improve this answer
YES yes yes! thank you.. now I feel stupid :) – mikkelbreum Dec 2 '11 at 8:34

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.