This worked for me.
$user_query = new WP_User_Query( array( 'search' => '*example.net*', 'search_columns' => array('user_url') ));
$authors = $user_query->get_results();
The wild card to be used in the search string is ‘*’ and not ‘%’. Also you have to include the ‘search_columns’ parameter with the following possible values
search_columns = array( 'user_nicename', 'user_login', 'user_email', 'user_url' )
Importantly, these are the actual field names from the users table. I tried my above mentioned query using 'search_columns' => array('url')
and it failed.
Related Posts:
- How can i list current author’s categories?
- How to use WP default post list tables in a plugin?
- How to show the posts listing on dashboard or custom page in admin panel?
- How to grab data after wp user search is complete
- WP Job Manager – Show recent jobs as cards
- Making a user platform reachable by a qr code on a pin-back-button [closed]
- Is get_option function cached?
- How to include jQuery and JavaScript files correctly?
- $_POST form request with admin-post
- How do I log plugin (cron) actions?
- How can I run AJAX on a button click event?
- Adding pre-publish checks with Gutenberg
- Error getting correct blog_id on MU from functions.php
- How Do I Make WordPress Run an Event Every Day?
- How can I change the frequency of a scheduled event?
- How to filter $post->post_content prior to save
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- Front-End Form Submission in Shortcode
- How to check if certain plugin exists and in expected version
- How to add SQL file with PHP to WordPress database [closed]
- Plugin Localization
- Error : “Updating failed: The response is not a valid JSON response” with custom shortcode
- array_map() for sanitizing $_POST
- calling jquery function on plugin page
- Is there a faster way than wp_insert_post to add content to a blog
- How to include external library in wordpress plugin
- Delete a specific item menu when I deactivate my plugin
- Ajax in WordPress – path issue
- Platform/Website that Supports Crowd-Funded WordPress Projects? [closed]
- Get user id for delete and update selected user
- How can I call template partials inside my custom plugin
- Decrease RSS cache time in plugin?
- Add version query tag to all images
- Creating table with plugin is not working
- How to add a custom tag in contact form 7 and change the output in email?
- How to delete an user including data from custom database tables
- How to check if Woocommerce Order number equals to post ID?
- Add custom element ID depending where the widget place is, sidebar or footer
- My plugin class doesn’t work! [closed]
- Beginner advice
- Call PHP file within a plugin to activate function
- add_action not calling back to function
- Example Dashboard Widget, Cancel not working
- Woocommerce checkout update totals with datepicker
- correct way to call javascript into hook function
- Multiple options pages validation for a plugin
- How to get plugin activate URL to use URL vars?
- rewrite URL based on selected taxonomy for post page
- Woocommerce – Convert Delivery method into a custom field
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- get_option() not returning expected value from plugin
- Woocommerce Composite Products – Add a composite product to cart programmatically via ajax [closed]
- Testing Rewrite Rules with PHPUnit
- Add a page in admin without adding menu item
- Possible to get all posts with my shortcode?
- Avoid updating post when sending POST or GET request to post.php
- should i be checking for jquery before enqueing it in a plugin
- How to prevent someone from entering strings without making it available for translation?
- WordPress theme options Menu
- Add information to HTTP Header in WordPress Plugin
- Moving/dragging a metabox removes TinyMCE’s content
- How can I develop a plugin that generates a page dynamically
- Catching Gutenberg sidebar switch event
- Can’t retrieve body params from PUT endpoint using formdata
- Redirect in WordPress plugin
- Converting data-name editor plugin to Gutenberg plugin
- Writing editor content to a file
- Forward an old url rewrite scheme to a new one?
- $wpdb in php 5.5
- how to display a string in admin_notices hook from a class plugin
- How to exclude categories from get_categories() select list inside a widget admin panel
- How to automatically activate a plugin on install
- disable defaault wordpress comments from a plugin
- WordPress plugin development theme issue
- add_editor_style to the blog editor view (Gutenberg?)
- Using custom IDP with WP
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- Securing custom rest API endpoints with public access from PWA
- By adding “?login – failed” code unable to access my dashboard
- jQueryUI draggable doesn’t work in WordPress plugin
- How do I make secure API calls from my WordPress plugin?
- esc_attr() on hard coded string
- Creating a return url for getting data from external api
- How to prevent users from deleting their accounts?
- How do I get a reference to the HTML memory buffer while the page is being constructed?
- Is it possible to restore an expired transient?
- How to Maintain url on form submit
- Experts opinions needed: How (in)secure is this approach?
- add_option_{$option} action hook not being called
- Remove all capabilities in separate method fails versus included in method
- WP API users per page
- action callback, for action dispatched as reported by hook sniffer, not called
- variable created in page.php is null inside of header.php
- Access WordPress Tag Function From Modal
- add short code not working
- how can I insert a link on login page
- Shortcode attribute “title” doesn’t appear in $atts array
- How to add extra EXIF data when images are uploaded?
- How to boost WP custom post REST API GET queries by custom taxonomies
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]