Query Problem
-
All,
I’m running a query to return a list of child pages, the related excerpt and featured image thumbnail. The result looks like the following:
As you can see, the list returned isn’t sorted alphabetically, while the side bar is. My code is as follows:
+++++++++++++++++++++++++++++++
<h2><?php the_title(); ?></h2> <?php $this_page_id=$wp_query->post->ID; ?> <?php query_posts(array('order' => 'ASC','showposts' => 20, 'post_parent' => $this_page_id, 'post_type' => 'page')); while (have_posts()) { the_post(); ?> <!--begin profile--> <div class="postprofile"> <div class="postprofile_photo"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } else { ?> <img src="<?php bloginfo('template_directory'); ?>/imgs/default_thumbnail.gif" alt="No photo available" title="No photo available" /> <?php } ?> </div> <div class="postprofile_text"> <h4><?php the_title(); ?></h4> <?php the_excerpt(); ?> <p><a href="<?php echo get_permalink(); ?>" title="View profile">View profile</a></p> </div> <div class="rien"></div> </div> <!--end profile--> <?php } ?>
+++++++++++++++++++++++++++++++
How can I modify the code to have the list display alphabetically by title?
Thanks in advance.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Query Problem’ is closed to new replies.