Query Posts by Custom Field ‘Price’
Use the pre_get_posts action to detect some filter vars in the URL and filter the query accordingly. For example, say your form sets price_low and price_high GET vars, so the URL looks like: domain.com/?price_low=100&price_high=1000 Then your filter function checks for the presence of those vars and creates the meta_query. This example is checking if it’s … Read more