Support

Account

Home Forums Front-end Issues WP_Query meta_value oddity Reply To: WP_Query meta_value oddity

  • You need to enclose your value in quotes

    
    value’ => '"Melbourne"',
    

    The values is stored as a serialized array in the database and each value is enclosed in double quotes. To look for specific values you add the quotes to the value to limit the like statement when there are multiple values that may match. The same is true when searching for a specific ID (number) value.