Title: Sort Testimonials Alphabetically
Last modified: June 23, 2017

---

# Sort Testimonials Alphabetically

 *  Resolved [WTadmin](https://wordpress.org/support/users/wtadmin/)
 * (@wtadmin)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sort-testimonials-alphabetically/)
 * Hi there,
 * I need to sort all testimonials so they appear in the ‘View’ alphabetically by‘
   Title’.
 * I tried using the ‘Menu Order’ sort option, however I have hundreds of testimonials
   and I will have to manually reorder each entry into alphabetical each time. This
   will be very time consuming.
 * Is there another way?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Chris Dillon](https://wordpress.org/support/users/cdillon27/)
 * (@cdillon27)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/sort-testimonials-alphabetically/#post-9254798)
 * To sort all views alphabetically, add this to your theme’s functions.php or create
   an [mu-plugin](https://gregrickaby.com/2013/10/create-mu-plugin-for-wordpress/).
 *     ```
       /**
        * Sort testimonials alphabetically.
        */
       function my_testimonials_orderby( $args, $atts ) {
       	$args['orderby'] = 'post_title';
       	return $args;
       }
       add_filter( 'wpmtst_query_args', 'my_testimonials_orderby', 10, 2 );
       ```
   
 * To sort a specific view only; for example, view id 2:
 *     ```
       /**
        * Sort testimonials alphabetically.
        */
       function my_testimonial_view_query( $args, $atts ) {
       	if ( 2 == $atts['view'] ) {
       		$args['orderby'] = 'post_title';
       	}
       	return $args;
       }
       add_filter( 'wpmtst_query_args', 'my_testimonial_view_query', 10, 2 );
       ```
   
 *  [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * (@jdcohan)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/sort-testimonials-alphabetically/#post-9361753)
 * I added this line to ensure sorting ascending:
 * `$args['order'] = 'ASC';`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Sort Testimonials Alphabetically’ is closed to new replies.

 * ![](https://ps.w.org/strong-testimonials/assets/icon-256x256.png?rev=3134855)
 * [Strong Testimonials](https://wordpress.org/plugins/strong-testimonials/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/strong-testimonials/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/strong-testimonials/)
 * [Active Topics](https://wordpress.org/support/plugin/strong-testimonials/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/strong-testimonials/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/strong-testimonials/reviews/)

## Tags

 * [alphabetical](https://wordpress.org/support/topic-tag/alphabetical/)
 * [order](https://wordpress.org/support/topic-tag/order/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)
 * [views](https://wordpress.org/support/topic-tag/views/)

 * 2 replies
 * 3 participants
 * Last reply from: [Jeff Cohan](https://wordpress.org/support/users/jdcohan/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/sort-testimonials-alphabetically/#post-9361753)
 * Status: resolved