Ok, Follow these steps to sort by last modified.
Note: current code only works for listing pages.
1) Geodirectory > Place Settings > Sort options > Make sure you have added “Date”
2) Select descending should be checked and set as default should be selected too. For value enter “Last Modified”
3) Save it
4) Now paste the following code in your child theme’s functions.php file
function last_modified_geodir_posts_order_by_sort($orderby, $sort_by) {
if (($sort_by == 'post_date_desc') && geodir_is_page('listing')) {
$orderby = str_replace('posts.post_date desc', 'posts.post_modified desc', $orderby);
}
return $orderby;
}
add_filter('geodir_posts_order_by_sort', 'last_modified_geodir_posts_order_by_sort', 10, 2);
Let me know how that goes.
Thanks