I manage to find the correct term =), but now filtering by the category on the shortcode does not work anymore.
Hi, thank you for your answer.
I understand that I should change this line:
$sql_sort = ‘ORDER BY distance DESC ‘. $limit;
but what should I put instead of the ‘distance’ is I want sort by title (name of the store)? Nothing I tried worked.