order ASC in query_posts() not working
-
I can’t get the order parameter of query_posts to function properly
Here was the original code:
query_posts("showposts=$et_ptemplate_gallery_perpage&paged=" . $et_paged . $gallery_query);
Here is the new query sorting by titles and ASC order:
query_posts("showposts=$et_ptemplate_gallery_perpage&paged=" . "&orderby=title&order=ASC" . $et_paged . $gallery_query);
It does sort by title, but not in ASC order
I have run out of things to try.
Here is a larger section of the code
<?php $gallery_query = ''; $portfolio_count = 1; $et_open_row = false; if ( !empty($gallery_cats) ) $gallery_query = '&cat=' . implode(",", $gallery_cats); else echo '<!-- gallery category is not selected -->'; ?> <?php $et_paged = is_front_page() ? get_query_var( 'page' ) : get_query_var( 'paged' ); ?> <?php query_posts("showposts=$et_ptemplate_gallery_perpage&paged=" . "&orderby=title&order=ASC" . $et_paged . $gallery_query); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Thanks in advance for the help
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘order ASC in query_posts() not working’ is closed to new replies.