query posts – Need to add a space after meta value in query_posts in wordpress for zipcode search


query_posts on wordpress has been trimming the last space of meta value added. on my case I need to add a space after zip code on the meta query

$meta_query[] = array(
                                    'key' => 'address',
                                    'value' => $postcode,  // after postcode need to add a space
                                    'compare' => 'LIKE',

But the last space is trimmed by wordpress . Is there any way to add a space after the postcode value. I have seen the same issue here WP_Query meta_query where meta value ends in space

But it’s not working for me

Amal 1 year 2021-09-07T00:35:52-05:00 0 Answers 0 views 0

Leave an answer