This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Array of values for custom fields

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Array of values for custom fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24201
    zisis19zisis19
    Participant

    Hello. I am using the Ajax Search Pro Plugin to generate a kind of filterable isotoped layout structure of a custom post type I created. All works well and I am custom fields (which I generated with the acf Plugin) to filter the search results which I’ve set to appear on default when the page loads.
    Now, I have some posts of this custom post type, that belong to more than two values for the one of the custom fields.. What I mean.
    Let’s say, my custom field is called “Category”. Some posts belong to the “cat-1” and others to “cat-2” and some to both of them…
    So, when the user clicks on the button “cat-1” that is generated by the plugin (it is originally a checkbox, I know, but I styled it to look like a button), the posts that belong to this category appear, and the ones from “cat-2” dissappear.
    How can I set some posts to belong to both of these “cat-1” and “cat-2” values? I don’t think it is as simple as to write in the field of the custom field just “cat-1 cat-2” …. I think this will just generate an extra filter button..
    I hope I made my issue understandable.

    Hope to hear from you soon

    #24206
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Well, with simple custom fields that does not seem to be possible. You should try ACF, that supports some data structures, such as checkboxes etc.. that allows multiple values within one field. The search also supports those, so no duplicate values are displayed when using them.

    #24209
    zisis19zisis19
    Participant

    PERFECT!!! That did absolutely the trick!!! Thanks Ernest. Amazing Plugin.

    #24210
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Array of values for custom fields’ is closed to new replies.