How to extract specific post

I’ve to extract only the posts where the meta_value does’t contain some specific string.
I use this code:

$query = new WP_Query(
‘post_type’ => ‘estate’,
‘post_status’ => ‘any’,
‘meta_key’ => ‘getrix_id’,
‘meta_value’ => array(‘miogest_’, ‘oneclick_’, ‘gestifiaip_’),
‘meta_compare’ => ‘NOT LIKE’

I have to discard all the records with meta_value containing strings ‘miogest_’, ‘gestifiaip_’ and ‘oneclick_’ but, in this way, the returned results aren’t correct.

Can you help me, please?

Read more here:: How to extract specific post

Leave a Reply

Your email address will not be published. Required fields are marked *