[Resuelto] Allow User to choose sort order (using custom field)
This support ticket is created hace 8 años, 4 meses. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun
Mon
Tue
Wed
Thu
Fri
Sat
-
9:00 – 18:00
9:00 – 18:00
9:00 – 18:00
9:00 – 18:00
9:00 – 18:00
-
-
-
-
-
-
-
-
Supporter timezone: Europe/Madrid (GMT+01:00)
This topic contains 11 respuestas, has 3 mensajes.
I haven't gotten very far! I have set up the custom field "Alpha List" but don't know how to write the code for functions.php or the combo output for the view. If this is too much to ask let me know. Not a must have but definitely would be nice to have!
Also wanted to add that Juan did at some custom code to my functions.php in the other thread where I had things sorted by title (because my view uses pagination). Curious to see this work without custom code! 🙂
This is Juan, glad that I could help you before, and willing to do it again 🙂
I remember I edited come custom code so that you could display links that set the sorting of the View manually and played nicely with pagination. I understand that what you want now is to display an additional link that will sort the View by a custom field value (and you are using this custom field to store the post title without some starting kind-of-prefix words).
To do so, I will need the slug of the custom field you are using to store that kind-of titles. After that, I will update the code I added to your site so you can create that sorting link. THen, I will add that code here so anyone else can benefit from it. Maybe it wil be useful for me when we implement a canonical way of doing so 🙂
Sorry for the late reply, but I have good news 🙂 I did not need to add any new code to your site. I just needed to pass the right atribute to the shortcode we created before. To sort by a custom field with slug wpcf-alpha-list, you just need to pass the attribute sort="post-field-wpcf-alpha-list".
I added this to your Comics page and it seems to be working fine. If you could confirm it, we could close this ticket 🙂