This support ticket is created Il y a 8 années et 4 mois. 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.
Hello and thank you for contacting Toolset support.
With views, you can order your posts with custom fields, you can check if the custom field that maintain the order using your plugin, is that custom field is available when you edit your views under "Ordering" section drop-down.
if it’s not available there, perhaps it’s a custom field, you can bring custom field under Types control from:
=> Types => Custom field control
Once your custom field is successfully imported to Types, you can check the "Ordering" drop-down for same field and set "order by", your custom field.
It has sort by menu order which I would have thought would work - but it just ignores it. That plugin just uses the default wordpress 'order' attribute.
We had a filter overriding it, working nicely now but - i need a better way of determining which view is being used, on some pages we have nested views, which may be ordered differently.
How do I detect the view ID being used?
// USER SORTING QUERY
add_filter('posts_orderby', 'my_client_order', 98, 2);
function my_client_order($order, $q) {
if (!empty($_GET["wpv-sort"])) {
$sort = $_GET["wpv-sort"];
if ($sort == 'alpha-asc') {
return 'post_title ASC';
}
if ($sort == 'alpha-desc') {
return 'post_title DESC';
}
//---
//Support from wp-types:
if ($sort == 'date-asc') {
return 'post_date ASC';
}
As the original issue is resolved may I kindly ask you please to open a new ticket for your new question and mark this thread as resolved. This will also help other users with similar problems find solutions when searching the forum.
Thank you for understanding.
Le sujet ‘[Fermé] Sort view by page order’ est fermé à de nouvelles réponses.