Using this code:
<?php
if (is_page('partners')) { ?>
<?php $temp_query = $wp_query; ?>
<?php query_posts('cat=10&orderby=title&order=ASC'); ?>
<?php while (have_posts()) : the_post(); ?>
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php endwhile; ?>
<?php }
?>
I expected alphabetical. My goal is actually reverse alphabetical, but this isn't even showing "a" first. View it here:
http://www32.a2hosting.com/~mpallas/who-we-are/partners/
NO posts in this category are set to sticky.
eric211c
Member
Posted 3 years ago #
I am having the same problem, any word on this?
What isn't sorting alphabetically? Everything I looked at on that page looked sorted. FYI, to reverse sort: order=DESC
Link change:
http://www.lighthouseconsultingpartners.com/who-we-are/partners/
I don't see the sorting. I see:
Detroit Chamber of Commerce
Institute of Management Consultants
Association for Computing Machinery
International Association for Outsourcing Professionals
But 'A' should come before 'I' if were sorting alphabetically.
If you're not getting sorting, then I'd say your query is not getting executed properly, because that code is correct. orderby=title should work perfectly.
Can you post more of the page than just the snippet? Use http://wordpress.pastebin.com and post the link back here.
I was experimenting with using one template for many page types, so would be great to know how I'm screwing up.
http://wordpress.pastebin.com/m5dc931c5
Hmmm.. Weird. Are you sure that this code is actually getting used? Is this like in your page.php file or what?
yes, this is page.php. I assume the code is being used, since category 10 (the partner listing) is shown. I don't know how to test that though.