The author key/value query won’t work.
Try modifying the query by moving the query out of the meta query like so:
array(
'author' => $author,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'leads_status',
'value' => '-1',
),
array(
'key' => 'leads_status',
'compare' => 'NOT EXISTS',
)
)
)
Related Posts:
- Where is the best place to use add_filter
- Edit plugin without hooks in functions.php
- Using add_filter inside another class
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Pass A Value From Outside To A Plugin Variable
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- Custom preview_post_link not working for draft post
- Add Fields with Sub-Fields to WP Job Manager
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- Creating a plugin to sanitize comment and the url field before display only
- How to find the origin of a file upload from within wp_handle_upload?
- White page by using filter template_include
- How to check current user before all actions and filters?
- Create a navbar filter that filters by a custom field
- Passing an array from shortcode-function to filter-function
- Get Time Taken By Each Action Hook in WordPress
- qTranslate remove default directory from link
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Proper way to replace the_content only for pages created by custom plugin
- add_filter doesn’t work
- Redirect to another page using contact form 7? [closed]
- Check if variable is set in filter
- Check filter defined or not?
- Add a function call after content automatically?
- what is the point of telling add_filter how many parameters you want passed to the function?
- How to add filter for wordpress plugin?
- How to use add_action for multiple instances of the same class
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Want to create custom design of progress indicator in wpforms
- Add hook after content without formatting
- Using OR Condition with facetwp facets
- 500 Internal server error wp_handle_upload_prefilter
- Nested Actions and Filters
- Remove action added in plugin class from theme
- Using multi-dimensional array with filter
- Can I add content before post content without using the_content filter
- WordPress Add advertising ads befor and after content with periority [closed]
- trying to create simple plugin to filter categories from all authors
- shortcode which is introduced into entry the blog, and appears in side bar
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- Get a list of all registered actions
- Update plugin from personal API
- Where the Nickname is being used in WordPress
- WordPress apply_filters() Arguments Missing
- How can I include a setting that has a variable number of values in a settings page using register_setting?
- How to prepend to the_title for admin-side plugin’s use
- Custom data-id wp_enqueue_script
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- Creating search filter through plugin
- Yoast SEO blocking/re-initialising longer running process
- template_redirect not being called when using ajax
- How use %like% in sql statement wordpress
- Can I use a form in a dashboard widget?
- Is there a way to alter the order in which the plugins appear in the page?
- How to correctly detect accessing wp-content/uploads?
- MITM risk of not sanitizing?
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- WordPress plugin – Error “Plugin generate 2890 characters of unexpected output when activated”
- Change plugin main file name (that is currently in the repo)
- Edit Yoast SEO breadcrumbs output [closed]
- How to remove plugin metaboxes from edit.php
- Suggestions on Approach to New Plugin I’m Stuck On
- Insert Array in Plugin Database
- plugin wraps the entire content
- Shortcode Attributes to Return different $_POST
- How do I change where a plugin pulls updates from?
- How programatically cause uploads folder to be created?
- Using Class loader in WordPress boilerplate
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Allow a particular user to access a particular plugin?
- How to dynamically add template in Innerblock?
- Add style to body based on url
- $wpdb->insert not working inside save_post tag
- How to check for already existing plugin versions on activation? and prevent errors
- update_post_meta is not working for me when I use e.preventDefault for update button
- How to create a plugin with automatic update?
- how can I edit the HTML of yith ajax product filter
- Loading plugin script only on required page?
- Plugin management with my custom plugin
- How to pass value from WordPress to Javascript
- How do I create a state of “don’t assign anything to variable” if WP_Error throws an error?
- Plugin communication between sites that use it?
- Provide http service by wordpress plugin
- create web service for android app using wordpress website
- Widget Script Loads at Bottom of Page
- WP internationalization not loaded
- Adding custom cron_schedule prior to wp_schedule_event
- Create plugin with form in post and submit it to specific form
- Get page type to display content
- Widget redirecting to home page
- Capturing POST data
- Is an Office a custom post type [closed]
- I am using multi image metabox plugin but I did get how to display the images in templete?
- How to open author url linked to a new tab in settings page in the WordPress plugin list
- How can I properly sanitize the update_option in WordPress?
- Why is my menu page not being displayed?
- Uncaught Error: Cannot use object of type stdClass while showing the list using WP_List_Table
- plugin doesn’t retrieve data from database