Hi David,
On archive page it uses secondary sorting used in CPT > Settings > Sorting but on widget it applys only parent sorting.
I have added following PHP snippet to apply secondary level sorting to the widget listings.
/**
* Add secondary level sorting to the widget listings.
*/
function gd_snippet_191112_filter_widget_listings_orderby( $orderby, $table, $post_type ) {
global $gd_query_args_widgets;
$sort_by = ! empty( $gd_query_args_widgets['order_by'] ) ? $gd_query_args_widgets['order_by'] : '';
$orderby = GeoDir_Query::sort_by_children( $orderby, $sort_by, $post_type );
return $orderby;
}
add_filter( 'geodir_filter_widget_listings_orderby', 'gd_snippet_191112_filter_widget_listings_orderby', 0, 3 );
Please check and let us know.
Regards,
Kiran