How to get post between two meta value range in wordpress?

I am trying to get product by price range. For example list all product which has its price between 0 and 1000 (it will vary).

my code is

Read More
[post_type] => product
    [orderby] => ID
    [post_status] => publish
    [posts_per_page] => 18
    [offset] => 0
    [meta_query] => Array
        (
            [relation] => AND
            [0] => Array
                (
                    [key] => wpcf-price
                    [value] => Array
                        (
                            [0] => 0
                            [1] => 1000
                        )

                    [type] => NUMERICAL
                    [compare] => BETWEEN
                )

        )

this code is not working properly.How can i fix this issue?

Related posts

1 comment

Comments are closed.