Forums › Forums › Search & Filter Pro › Strategy for multi-value Post Meta field
- This topic has 8 replies, 2 voices, and was last updated 7 years, 9 months ago by
Anonymous.
-
Anonymous(Private) July 26, 2017 at 6:07 pm #122987
I’m trying to figure out the best strategy for filtering some post meta. They were originally setup with a comma separated value inside one field but that isn’t going to work with Search&Filter plugin. My example is days of the week which is great if all were a single day but I have some values such as the following:
monday, friday
monday, tuesday, wednesdayI’m hoping the drop menu will only list out the individual days [Sa, Su, Mo, Tu, We, Th, Fri] in the drop menu. Is categories or a custom taxonomy the only multi-value option I could use to set multiple days?
Can preview how it’s working here at the top in the first drop-menu:
Trevor(Private) July 29, 2017 at 8:39 am #123468You don’t integrate with a field group as such, hence it isn’t in the documentation.
An ACF field group, in its settings is attached to one or more post types. That makes its fields show on the post editor page.
In the field group you must make a field that has a data type that allows multiple entries. Beware of naming the field/meta key. The ‘name’ (as ACF calls it, but in reality is its slug name or meta key) must NOT be the same as one you have used before. ACF also has a field label, not to be confused with the name.
When ACF saves each field, it gives them 3 meta keys. Let’s say your field has a ‘name’ of
country
, then ACF will give it these 3 meta key names – use only the first one when making the S&F form, the other two are used by ACF to link data. I have used xxx’s where ACF will add a random string:country
_country
field_xxxxxxxxxx
Anonymous(Private) July 31, 2017 at 5:25 pm #123803For some reason, I’m only able to spot the field_xxxxxxxx in S&F and not the field name. Here’s a view of the settings. I selected the Field Groups in the search for post types. Is there a particular field type that I need to use in ACF? I tried Relationship & Post Object.
-
AuthorPosts