• Hi Tijmen,

    Me again!

    Is it at all possible to prioritise certain categories in the search results over any others? As an example on our site we will have Premier and Advantage and we would like Premiere to always show at the top of the results list if any are found within the radius.

    Is this at all possible please?

    Thanks
    James

    https://wordpress.org/plugins/wp-store-locator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    It should be possible, but I have to look into it a bit more how to do that. So I will get back with hopefully a code example later.

    This code example does sorts the results alphabetically, but that’s not what you want. To make it work, you would have to include the cat name in the $store_meta, and then sort the results based on an array holding the order of the categories. I just have to look into how to do the last part.

    Any hint on how to include the category in $store_meta?

    At the moment the category is only used in “find_nearby_locations()”, and is not available in the wp_postmeta

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This code includes the category names in the returned search results.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prioritise certain category in search’ is closed to new replies.