Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created Jul 22, 2021
Embed
What would you like to do?
<?php
global $wpdb;
$blog_id = get_current_blog_id();
$user_query = new WP_User_Query( array(
'meta_query' => array(
'relation' => 'AND',
array(
'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities',
'value' => 'subscriber',
'compare' => 'like'
),
array(
'key' => $wpdb->get_blog_prefix( $blog_id ) . 'capabilities',
'value' => '07_jul',
'compare' => 'not like'
)
)
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment