Here is the procedure to sort alphabetically in word press.
$args = array( 'post_type' => 'instructors', 'orderby'=>'title','order'=>'ASC' );
for custom fields:
$args = array( 'post_type' => 'calendar' , 'posts_per_page' => '-1' ,'meta_key'=>'course_name','orderby' => 'meta_value', 'order' => 'ASC' );
Suggestions are welcomed..
No comments:
Post a Comment