NO BUG: Unable to filter out empty reviews (posts)

Hello, I imported google reviews on my website, and I would like to show just the reviews with some content.

I try both filter setups as showed below, but without success:

image
image

When I apply one of those filters, no reviews are showed.

Thanks for any potential help!

Much appreciated).

{post_content} is the content from the post editor … so it is not going to do anything in relation to reviews.

My recommendation is create custom post type of “Reviews” and then you an assign data however you wish.

Hello, thanks for reply).

I got reviews as CPT and the content of the review / text is saved as normal post content.

So basically you suggesting to add ACF for text review and then use that for filtering?

Thanks for you time).

Of course, in query loop I got “Reviews” filtered

Hello @freedomdesigner,

if possible, it would be probably the easiest if you can ensure that all reviews that you add to CPT, have content. Or at least if there is no content, that it’s not published.

WP_Query does not have a direct parameter for checking content emptiness, that’s the issue here. And if you need that, you will have to use a filter like Filter: bricks/query/result – Bricks Academy

Best regards,
Matej

An alternative to the above would be to use a custom field for the content of the reviews, and set the condition for that field, rather than the default content field

Yep, that’s also an option. :slight_smile:

sure, solved, I will use CPT for reviews) was just wondering if there is no better way).

Thanks!