add : $inner_arrays['relation'] = 'OR';
and then query will be like :
$args = array(
'post_type' => 'products',
'post_status'=> 'publish',
'meta_query' => $inner_arrays
);
this works …. 🙂
Related Posts:
- Using AND and bracket grouping in SQL not working
- pull data from wordpress database
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- How is the data stored in the database?
- Activation hook not creating table
- Is the usage of ON DELETE CASCADE wrong or not allowed on wordpress?
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- WordPress database error for query INSERT INTO
- How to connect to AWS RDS external database (not for the core WordPress db)
- How to create database table, add data, update and delete using wpdb via plugins?
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- Auto-complete or auto-suggest from stored data in database
- What might be the reason of Couldn’t fetch mysqli_result on another domain?
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- WordPress doesn’t create table on plugin activation
- Organising and completing posts (mark as read and hide)
- Custom MySQL query to pull out Advanced Custom Fields?
- How to filter get_adjacent_post()?
- Foreign wp_users ID in custom plugin DB table?
- How to Get Last ID?
- WP_Query order posts by category
- Is it possible to use the MySQL’s ORDER BY FIELD() clause as part of the pre_get_posts hook?
- SQL query injection with fifu image
- Error code when migrate
- What database state changes happen after a post is manually “updated” with no changes?
- DB prefix not updating
- Multiple dynamic Tax Query – pass taxonomy argument from array
- Why last row deleted when refresh page
- WP Query – grouping posts by same meta key, adding together values from another key
- Performing CRUD operations on front end in wordpress
- Why User_login key doesn’t work with wp_update_user()
- I wanted to Know that how can I give ingore to 0000-00-00 in my config file
- WP_Query not ordering correctly
- How to check category name available or not
- Home page is not loading, where in other pages are displaying on the site
- How to store sensitive user data (passwords)
- Insert, update or remove data from database (usermeta)
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- how to create a shortcode from a variable in plugin
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- Bulk find & replace on WordPress posts/pages (minus image paths)
- Error Connecting to Database WHEN Installing WordPress on XAMPP [Tried All the Usual Stuff] (Pics Included)
- WordPress Fatal error: Uncaught Error: Call to undefined function dbDelta()
- User meta query using Wildcard
- Fix wp_term_relationships slow query in get_posts
- Translating WP query into to SQL query
- Group By in a Metaquery
- Is it possible to replace MySQL with JSON files for WordPress
- WP Query date_query with several date range
- Use admin-post to submit form data to external database
- How to create index (sql) to a meta_key?
- Save in my custom admin page and redirect to the saved object
- Relational / Associate tables using native WordPress functionality
- The function is deprecated; use mysql_real_escape_string() instead
- Delete all users meta that named: user_avatar
- Insert Data into Database
- Update database record in plugin
- WordPress delete mysql rows with string
- How to store in the database directly the translation?
- The MySQL Connection could not be established., before it was joomla but i have change it into worpress
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- Making Woocommerce optimized for more than 500k products
- Post Pagination does not working on WP-Query
- WP Query Relations / Compare
- Plugin MySQL SELECT custom data and filter on user meta
- How can I query 3 posts from diferente categories (one of each category)
- SQL Query Search page
- sql query not working in wp plugin
- $wpdb Mysql trigger problem
- Query only title/field/featured media of posts [closed]
- direct query to post_meta table
- can’t delete a row from post_meta table
- Ajax not working to insert, query and result data
- I can’t write in my DB using $wpdb->insert
- Why Worpdress doesn’t create table in database?
- Form and database, plugin development
- Include post_status check within $wpdb query
- Associating special meaning with user id 0
- Custom post order when using OR relation
- WP_Query always returning the last custom post
- $wpdb how can i save my postmeta table before querying it
- post_results filter confused by pagination in sidebar and main section
- How to add chunk of php, html, and sql code to variable an append to $content
- What method should I use to store my plugin data (multi level menus with options on each item)
- Can’t get query string in ajax call
- Get custom wp_query search results to appear on search.php
- How to add additional field in a table row after creating a table?
- WordPress plugin tables become corrupt
- Post data in wp-admin to external database
- loop and in admin header problem
- Nothing happens on WordPress Update command
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- How do I query posts and have their related taxonomies returned in the results?
- export individual posts to text files or a single csv file
- Custom query_posts() parameter
- SQL query : Select a thumbnail for a media
- How to edit the default database of WordPress [closed]
- Best Way to Inventory the Media Library of a 200+ Multisite Installation?