A meta_query
is an array of arrays. You only have an array.
$query->set('meta_query', array(
'key' => 'shru_price',
'value' => $_GET['minPrice'],
'compare' => '>=',
'type' => 'NUMERIC'
));
It should be:
$query->set(
'meta_query',
array(
array(
'key' => 'shru_price',
'value' => $_GET['minPrice'],
'compare' => '>=',
'type' => 'NUMERIC'
)
)
);
And please validate/sanitize that user supplied data before using it !
Related Posts:
- WP User Query with search columns and meta query
- Combining Meta_Query key values for one array
- pre_get_posts and search query for admin
- Comparing between a negative and positive number
- Searching by meta values showing inappropriate result
- WordPress, fetching users with an exact match in a string of comma separated values in user_meta
- Meta query: How do I return posts within a date period from a given month?
- meta_query issue with multiple numerics
- Custom Query Content Filtering
- Search by meta_query
- Exclude posts with certain meta data from search results
- Form for search pages by meta datas
- WP search in metadata post
- Solr vs. ElasticSearch
- Search is always exact [closed]
- Empty search returns home page, how to return not found search page?
- Limit search to latin characters
- How to look at code in WordPress repositories without downloading?
- Insert DIV container below 1st search result
- How to make WordPress search prioritise page titles?
- How to add the author search in the default wordpress search?
- How to search for users based on added user metadata
- Search by Post ID and display content of the post in search result
- Let user change posts per page
- Turning Broken URLs Into Search Terms?
- filter search result with custom post type meta key
- WordPress Search Custom Meta Field Only
- Search uses index.php instead of search.php on renaming search field from “s”
- Changing the default WordPress search action
- Get the selected term in a dropdown search
- Separating search results collectively by type
- Set default text for the_search_query();
- What are the different options for excluding certain post types from search results?
- Search in post title and custom fields
- How to change users smart quotes to dumb quotes in search bar?
- Strange Search Queries in Apache Status
- Trim the search result around the search word
- Need to do blank search.
- Search function works improperly
- Why won’t is_search work inside functions.php?
- Is there a wordpress plugin enabling an autocomplete search box, then jump to page?
- Search functionality – include date, category and author search
- Date_query problems
- Need to return a list based on Slug
- Using parent slug variable to display proper submenu not working properly
- Get Adjacent post by search query
- How to exclude pages from WP search based on page title
- why pre_get_posts works fine in post type archive, but not in search result list?
- How to get started?
- Search.php display results differently based on post type
- Improved WordPress search functionality and search form plugin
- Use wordpress search to display results within a post
- How to query two meta fields and display results between them
- Sorting search results with custom dropdown
- how to search everything
- changing search result from only excerpt to full content
- Cannot pass ‘S’ parameter more than two letters
- Localization of WP theme
- Display Search Results after search 1st link
- How to have multiple instances of the same taxonomy in a search form
- WP + Google analytics = /search?
- Search result count not matching actual result
- WordPress custom search by post type
- WP_User_Query not searching
- How to search for post content and attached file names
- Replacement search plugin that reads widgets or catalogs entire page?
- Searching for one letter returns extra empty post
- How to create a search form with multiple search fields
- REST API: Search products only in the names
- Bots using internal wordpress search
- Search to include external content
- Altering search results to handle a post meta field not working in current WordPress
- WordPress Search by tags
- Re-order search results with posts_orderby filter and post meta value
- WordPress search post using unicode
- Create search box on Archive Custom post type
- How to pass variable to get_search_form()?
- Why the search results are wrong in search posts form?
- Search isn’t displaying all results
- How to use regular page template for search results?
- Search only blog posts on blog page
- Auto search field without buttons, shows first result from search page
- WordPress search.php pulling search results but also matching a page and pulling that information in
- Can I set up a search box that uses fields?
- How to Search Users on the Base of Latitude and Longitude in Users meta_key and meta_value
- I want to edit the search function
- Returning the entire line of a custom search result filter
- search does not yield access restricted results
- Customizing Home Page with Pagelines Platform
- Search Limited to Categories Not Working
- Google Search and Own Website Search?
- How we filter the search base on post-meta tags
- Make search result returned only from tags! [duplicate]
- Form Data Causes “Page Not Found”
- WordPress search form and input type=”image”
- Search options/filters
- How to search pdf attachment?
- Website Search Results Not Showing Images
- How to search for articles containing two words?
- Wp eCommerce meta information search [closed]