WordPress.org

Ready to get started?Download WordPress

Forums

Advance WP Query Search Filter
Won't search array. (5 posts)

  1. hypeon
    Member
    Posted 1 year ago #

    Hello, I'm struggling to get the plugin to search a custom field with multiple values,

    I have multiple answers in a meta field named Audience

    <?php echo implode(', ', get_field('audience')); ?>

    But when I choose one of the selections (with a Comparison Keyword set to 'Like') it doesn't find the item I am looking for.

    e.g. I have a custom field called Audience, in it are 10 different possible selections. I select three, and they display as Staff, Public, Members (etc with ',')

    I go to my search page with a drop down, look for Staff under 'Audience', click search and it returns nothing.

    The Audience Comparison Keyword is set to LIKE.

    I've tested the WordPress default search and it works fine.

    Any help appreciated, thanks!

    http://wordpress.org/extend/plugins/advance-wp-query-search-filter/

  2. TC.K
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,
    It is depends on how you store the array in your meta field database table. If it is serialized data, big possibility that the plugin will not works.

  3. matthewskeith
    Member
    Posted 1 year ago #

    Is it still the case that this plugin will not work with serialized data?

  4. TC.K
    Member
    Plugin Author

    Posted 1 year ago #

    @matthewskeith, yes, the plugin will not work with serialized data

  5. matthewskeith
    Member
    Posted 1 year ago #

    okay. thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic