WordPress Business Themes › Forums › Version 7 Themes › Real Estate Theme › Filter by price not working
I have created a search field “price” and would like to filter the results in descending order but it is not working. Maybe something wrong with the parameters added when clicking on the filter: “&orderby=meta_value&key=price&order=desc”
This is the entire query: ?search-class=PPT_S-ppt_s&cs-all-0=&cs-price-1=&cs-price-2=0-200000&orderby=meta_value&key=price&order=desc
this is wrong, it should be;
Also why don’t you set up the search for price so you have a minimum and maximum price?
Then your visitors can search more specifically and the search results will return faster.
Hi Mark, Actually I took a look in the Shopperpress Demo and noticed the filter by price is exactly the same as used in Realtorpress theme:
I don’t want to use Min/Max price fields because it is easier to customers searching the property using one field instead of two in my opinion.
I am using realtorpress 7.1.4 and WordPress 3.5.2 and was wondering if it can be related to:
1. The mask used to the price. Example: R$458.950,00
2. Some htaccess rewrite configuration
I also noticed that when using the parameter “&order=asc” at the end it is sorting the property “Title” instead of “price”. Example: &orderby=meta_value&meta_key=price&order=asc.
I appreciate any suggestion.
Hi – I have opened a support ticket for investigation.
Price values must be stored as numeric values to be searched correctly, so the price needs to be 100 not $100 (example)
In order to fix this I had to change the file class_design.php and replace the parameter “key=” by “meta_key=” in the following lines as your suggestion:
Also I have reviewed the prices values and deleted all comma and dot symbols.
Thanks for the tips.
Pablo nice work thanks for letitng me know
Submit your feature requests to our ideas board and it could be included in a future theme update.
or contact our support team