WP_Query Loop Overwritten
-
I have the following code that orders the CPT alphabetically in this query for easy viewing but when I activated the plugin and arranged the posts in the order I wanted them to display as someone clicks through the posts with pagination it overwrote my alpha listing query. Help!
‘orderby’=>’title’,’order’=>’ASC’
<ul class="row work-list" style="color:#FFF"> <?php $args = array( 'post_type' => 'work', 'posts_per_page' => -1, 'orderby'=>'title','order'=>'ASC' ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> <li class="col-md-4"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Query Loop Overwritten’ is closed to new replies.