Title: [Plugin: Testimonials Widget] Sorting
Last modified: August 20, 2016

---

# [Plugin: Testimonials Widget] Sorting

 *  Resolved [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/)
 * What “fields” can you sort on in the Testimonials Widget? I can’t seem to sort(
   i.e. orderby) on Company, URL, or email. I would like to have testimonials by
   state and have them sorted by city within state. How can I do that? Thanks. /
   Bob DeCloss
 * [http://wordpress.org/extend/plugins/testimonials-widget/](http://wordpress.org/extend/plugins/testimonials-widget/)

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

 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077087)
 * I’ve update release 2.1.2 to support a `meta_key` option for sorting by testimonial
   post meta values. See the shortcode options and examples at [http://wordpress.org/extend/plugins/testimonials-widget/](http://wordpress.org/extend/plugins/testimonials-widget/)
   for further details.
 * In short though, you can try `[testimonialswidget_list meta_key=testimonials-
   widget-company order=asc limit=10]`.
 * However, regarding your city and state information, there’s currently no addressing
   meta data provided. You could probably add that yourself via theme functions 
   though.
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077089)
 * Would it be possible to “trick” the system into using the url and/or e-mail as
   a sort field, then? In other words could we store “city” as a url and then use
   the meta_key for sorting? Thanks for the response. /Bob DeCloss
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077109)
 * Bob,
 * That sounds reasonable. Your options for the `meta_key` are testimonials-widget-
   company, testimonials-widget-email, testimonials-widget-url. Currently, commas
   aren’t allowed in the meta_key, but will be for 2.1.3.
 * Next, you might want to set `hide_url=true` in your shortcode or widget settings
   so that a city or state isn’t tried to be converted to a URL.
 * Buona fortuna!
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077130)
 * That didn’t seem to work, at least as I thought. Here is my code:
 * [testimonialswidget_list tags=AZ meta_key=testimonials-widget-url order=asc hide_source
   =true hide_company=true hide_email=true hide_url=true]
 * This appeared to only select the AZ tags and list them in descending “ids” order.
   I wanted to select only those tags that match Arizona, for example, and then 
   sort those by city, which is currently stored in the “url” slot. /Bob DeCloss
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077153)
 * Bob, I’m traveling today in rural Italy. I’ll try to replicate your scenario 
   when able by Monday afternoon.
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077157)
 * It seems to be working now. When I looked at the html code there was a ` ... `
   tag inserted at the beginning and somewhere in the middle of the shortcode. I
   removed that and it seems to be working. It just shows AZ now in order=asc and
   when I leave order out, it defaults to desc.
 * Here is what I found in the html code:
 * `[testimonialswidget_list category=AZ ` meta_key=testimonials-widget-url hide_source
   =true hide_company=true hide_email=true hide_url=true]
 * Not sure how that got there or even what it is. Thanks. /Bob DeCloss
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077158)
 * That’s interesting. When did the post, the `...` disappears. It was at the beginning,
   before the “[” and right after the “AZ”, just for your edification. Again, not
   sure how it got there. At one point I did just copy and paste your shortcode 
   from the above response. I see now that is what happened. At the beginning of
   your shortcode is ` and the ` is at the end. I copied that and did some editing
   in text mode not html mode and it got fouled up somehow. /Bob DeCloss
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077159)
 * Can you please copy and paste the shortcode here?
 * Use an extra [ ] around it to see the code correctly.
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077160)
 * Here it is:
 * [<p>`[testimonialswidget_list category=AZ ` meta_key=testimonials-widget-url 
   hide_source=true hide_company=true hide_email=true hide_url=true]</p>]
 * Like I say, it is working now that I removed the “code” tags. /Bob DeCloss
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077161)
 * Sorry, the “code” tags still don’t show, even with the [] on the outside. Here
   it is with ” instead of <>:
 * _[ Moderator note: It’s the backtick or use the code button when you post. ]_
 *     ```
       [testimonialswidget_list category=AZ "/code" meta_key=testimonials-widget-url hide_source=true hide_company=true hide_email=true hide_url=true]
       ```
   
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077162)
 * The code button is what you need to use or wrap text in the backtick character.
 * Or use [pastebin.com](http://codex.wordpress.org/Forum_Welcome#Posting_Code) 
   if that doesn’t work.
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077164)
 * Bob, think you can do WordPress > Tools > Export > Testimonials and send the 
   file to me via [http://typo3vagabond.com/contact-typo3vagabond/](http://typo3vagabond.com/contact-typo3vagabond/)?
 * Oh wait… are you saying that the shortcode is working as you want now?
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077168)
 * Yes, it seems to be working now that I took out the < code > and < /code >
 * Thanks. /Bob
 *  Thread Starter [brdecloss](https://wordpress.org/support/users/brdecloss/)
 * (@brdecloss)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077202)
 * I see there is an update 2.1.4, but the upgrade notices is blank. What are the
   changes and/or upgrades? Thanks. /Bob
 *  Plugin Contributor [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * (@comprock)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077203)
 * You can usually find changes to plugins on the Changelog like [http://wordpress.org/extend/plugins/testimonials-widget/changelog/](http://wordpress.org/extend/plugins/testimonials-widget/changelog/).

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

The topic ‘[Plugin: Testimonials Widget] Sorting’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/testimonials-widget_c56561.svg)
 * [Testimonials Widget](https://wordpress.org/plugins/testimonials-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/testimonials-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/testimonials-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/testimonials-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/testimonials-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/testimonials-widget/reviews/)

## Tags

 * [sorting](https://wordpress.org/support/topic-tag/sorting/)

 * 15 replies
 * 3 participants
 * Last reply from: [Michael Cannon](https://wordpress.org/support/users/comprock/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-testimonials-widget-sorting/#post-3077203)
 * Status: resolved