Forums › Forums › Search & Filter Pro › Search on location with post meta
- This topic has 14 replies, 2 voices, and was last updated 9 years ago by Anonymous.
-
Ross Moderator(Private) November 17, 2015 at 11:13 am #29986
Hi Kenny
Ok so I had a look.
So it seems that the plugin you use is doing something I consider to be extremely strange.
When you assign multiple fields in the front end plugin (not sure the one you are using), what it does is combine all your values into a single post_meta value – so when you assign Belgium & France, instead of creating two seperate values for Belgium and France, it concatenates them with a
|
.This is terrible for searching, and also logically speaking a bit bizarre – why wouldn’t you want to give each location its own seperate values.
Now a great plugin I use for post meta is Advanced Custom Fields – I’ve not used any of their front end functions before but it seems to be documented:
http://www.advancedcustomfields.com/resources/create-a-front-end-form/
Unfortunately I don’t think you could get any search plugin to search a post meta structure like that without using some kind of expensive queries probably using
%like%
.PS, you’re also on an outdated version of Search & Filter which we don’t usually provide support for however the problem you describing of course still exists in the latest version.
Thanks
Ross Moderator(Private) November 17, 2015 at 11:14 am #29987Just to add, it may be possible with your front end form/submission plugin to save the data in different ways in the database – in this case I would look at something like taxonomies, or a more efficient method with the post meta.
Thanks
-
AuthorPosts