php – How to say if meta_value is greater than 0 in an array?


Right now I have this:

$args  = array(
    'meta_key' => 'userfunds',
    'meta_value' => '0',    

Basically this will show users who have exactly ‘0’ as meta_value.

How do I say that meta_value has to be greater than ‘0’?

I have tried:

    'meta_value' > '0',  

But using the above, it shows all users, regardless of their value.

So I guess using > in the array is an invalid line and not what I need.

I know I’m probably missing something very small in my code?

should I use compare?

Any help would be appreciated.

robert0 4 days 2021-09-14T13:46:08-05:00 0 Answers 0 views 0

Leave an answer