Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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();
$customloop->query($args);

while ($customloop->have_posts()) { ... }
share|improve this question

1 Answer 1

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

 
discard

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.