query_posts
-
I am currently using:
<?php if (post_type_exists('athlete')) { query_posts(array( 'post_type'=>'athlete', 'showposts'=>-1, )); } while ( have_posts() ) : the_post(); $data = get_posts();?> <h4> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4> <?php endwhile; ?>
To pull a list of all of the “Athlete” posts onto a page.
What I would like to do is sort by last name which I currently have set up as a metabox field called “athlete_lname” and then display the athletes name in a two column list on the page.
The theme currently has css setup for two columns “two-col1” and “two-col2”
Thanks in advance for anyone’s help on this,
14ner
- The topic ‘query_posts’ is closed to new replies.