Support

Account

Home Forums General Issues Searching within an ACF meta_value

Unread

Searching within an ACF meta_value

  • I would like to search against an ACF field containing multiple product property values like “min_players”, “min_age”, and a nested object like “category”. The goal is to be able to select a few values and return a list of all products meeting those criteria. Something like

    “Select
    all products with a player count of 3 (between min_player and max_player),
    a min_age greater than 13
    and in the category called “Racing”

    An abbreviated example of the meta_value field from one record is listed below. Note the formatting on the blob is mine.

    a:15:{
        s:7:"min_age";
        s:1:"13";
        s:10:"min_players";
        s:1:"2";
        s:10:"max_players";
        s:1:"4";
        s:8:"category";
        a:1:{
            i:0;
            s:6: "Racing";
        }
    }

    Thanks in advance, ACF is pretty great!

Viewing 1 post (of 1 total)

The topic ‘Searching within an ACF meta_value’ is closed to new replies.