• Resolved tpuehri

    (@tpuehri)


    Hello,

    i would like to change the sort order of the store locations.
    You posted some code in the support forum but the link does not work anymore.
    Would you be so kind to send me code for alphabetical sort order.

    Thank you

    This was the post:

    mit (@tijmensmit)
    11 months ago
    This code sorts the results by store name. Just add it to the functions.php inside your active theme folder, but make sure to flush the WPSL transient cache on the settings page ( Tools section ) before reloading the store locator.

    If you want to sort it by any other values just replace $row[‘store’];with for example $row[‘address’];

    You can add a custom field, set a number that represents the preferred order, and then use that same field here $row[‘custom_order’]; ( assuming you named the field ‘custom_order’.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sort Order of results’ is closed to new replies.