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()?
- difference between primary key and unique key
- Should I use wpdb prepare?
- Fatal error: Class ‘ms\WP_Query’ not found on plugin initialization [closed]
- find a random blogid across my multisite network that has at least one post published
- Why Does get_posts() Return an Empty Set?
- Not sure the best way to save custom plugin data
- The ideal place for storing persistent PHP objects
- Slow SQL_CALC_FOUND_ROWS Query
- What is the added “complexity” of custom tables?
- Plugin development with unit tests
- get_posts / WP_Query Memory size of 134217728 bytes exhausted
- Formatting of curly brackets array from WP database to get more readable output
- How to modify post content before writing to database?
- Inserting Post Meta From SQL
- What is an efficient way to query based on post_meta?
- Display only certain posts based on visitor’s country?
- Hello dolly type plugin that allows people to add their own
- Handling form request from plugin file
- Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin
- What for the tables ending with the meta used in database of wordpress?
- Get a custom table to an array
- Finding posts containing matching array elements in a meta field usign WP_Query
- Error : “Cannot use object of type WP_Post as array in”
- using new WP_Query in save_post function alters $post
- I’m designing a plugin to create database indexes. Suggestions?
- Slow WP_Query for custom post type
- Create WP_Query to search for posts by their categories or their parent/child categories
- How should I store a log for my plugin
- Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?
- WP_Query filters
- How to fetch only current hour posts?
- Update results, Before deleting the related category [closed]
- WordPress pre_get_posts with combined results of two queries (OR)
- WordPress Backend HA (Automatic failover)
- mysql_real_escape_string() vs. esc_sql() in WordPress
- how to get all the child category name in a specified category name?
- How to query custom db table?
- Delete data from database using row action
- How do I have now a duplicated user entry if this is not allowed (and I cannot replicate it)?
- Prevent WordPress automatically processing certain URL queries
- Why this query is not showing any result on wordpresss home page?
- wpdb prepare insert table doesn’t work
- how to load the comment template from a plugin
- Why does changing Database Table Prefixes result in loss of content?
- How remove trashed WooCommerce orders from wc_get_orders() result?
- WP MultiSite: Can’t select database error after changing to new domain
- Brainstorm – Slow Query from Plugin Need to Speed It Up
- $wpdb->get_var – What value is returned when zero records are found?
- $wpdb->update Issue
- How to display results from a data table with an encrypted user id?
- Adjust query on single
- dbdelta failing with error: “WordPress database error Table ‘wp_2_myPlugin’ already exists
- Error code when migrate
- Home page is not loading, where in other pages are displaying on the site
- 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?
- 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()
- Fix wp_term_relationships slow query in get_posts
- Group By in a Metaquery
- Use admin-post to submit form data to external database
- Delete all users meta that named: user_avatar
- Query only title/field/featured media of posts [closed]
- can’t delete a row from post_meta table
- Ajax not working to insert, query and result data
- Associating special meaning with user id 0
- How to add chunk of php, html, and sql code to variable an append to $content
- Post data in wp-admin to external database
- loop and in admin header problem
- How do I query posts and have their related taxonomies returned in the results?
- Best Way to Inventory the Media Library of a 200+ Multisite Installation?
- Get all the related data from WordPress DB
- why you don’t Implement PDO for access every thing to database
- SQL Query to get post_id from wp_posts and and meta_key(s) from wp_postmeta
- $_GET vs get_query_var()
- How can I delete the options from DB when the plugin is deleted?
- Execute multiple PHP Snippets causes error?
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- WordPress database error: [Table ‘bitnami_wordpress.questions’ doesn’t exist]
- multiple record insert creating many duplicate records