I'm trying to add a sort / results feature on 2 custom fields which would look similar to what I've started here using categories but using custom fields instead: The channel is: "jokes" fields are called "joke_category" (dropdown list) and "rating" (checkbox). Without using a plugin do I have to write a mysql query? If so, would anyone mind giving me a head start here.

1 Answer 1


You could try using the entries loop's dynamic parameters and sorting that way - it depends on how you're accessing the sort - with a form, with a clickable link with custom segments the URL, or you could potentially get a bit fancy with it using jQuery. The dynamic parameters way be a bit less ideal if you're looking to filter as opposed to just plain sort.

  • It's accessible from the same list page. I was thinking it could have a 'results' page if needed. But it would be nicer (and cleaner) to just add the feature directly to the table already created on the list page if possible (i.e. it would recache or refresh the existing list table?) Table currently uses the basic datatables.net plugin which automates the basic features on that list including pagination and basic sort (without the filter). – lberelson 7 mins ago
    – lberelson
    Commented Oct 20, 2014 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.