Query Builder Sort By Field Name, Not by Date

I’m working on a site that has medical providers sorted by the level of their medical licensing. I’ve created taxonomies using the Pods plugin. I then created a relationship field that creates a dropdown option that appears when adding a new medical provider.

In my query string I have it sorting the providers by the ‘licenseordering’ field. I want it to sort by the name of the field, but it appears to be sorting by the date/time the taxonomy/field was created.

Any ideas on how to achieve this?

Hello @RinardMedia,

Thanks for writing in! Are you using the Query Builder or a Query String? Please provide the actual Query String or the screenshot of your Looper Provider Query Builder settings instead. We would also love to check it if we can log in. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Here’s a screenshot of the query builder and an example of the provider license sorting dropdown.

The dropdown fields are provided through a relationship field that pulls from a new category created called Licenses

In this instance the LicenseOrdering category 1210 DO Medical was created after the category 1300 PA-C Medical but should still sort above that category because of it’s numerical value.

@RinardMedia,

It seems that you’ve customized your wp-admin to something else because when accessing the page, it is showing a 404 page. Please provide the correct admin URL.

Thank you.

I’m sorry about that.

https://fhsid.org/rm-admin/

Hello @RinardMedia,

You should be using “Order By: Title/Ascending”

  • see the secure note below

    Thanks.

I’m not trying to sort by the post title. I’m trying to sort by a custom field in Pods. I’ve posted screenshots of the field I’m trying to sort by. It’s called ‘licenseordering’. They all start with a unique number.

Instead of using _pods_licenseordering, try using licenseordering. For number based meta values you also want to use “Meta Value Number” as the order. Let us know if this helps.

image

This did not help. It is still placing providers in order by when the category was created.

Hello @RinardMedia,

If you go to the Licenses, you have these:

You have:
1300 PA-C Medical with 2 items
2300 DDS Dental with 2 items
2500 RDH Dental with 4 items

And the order is exactly displayed by the looper. The items are displayed according to the licenses and in chronological order. If you want to display the items according to the license and by alphabetical order, you may need to switch to Looper Provider Query String so that you will have more control over the order.

  • See the secure note.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.