Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created July 22, 2021 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/be4297f8a3b99fc59e45bd00d94254b3 to your computer and use it in GitHub Desktop.
Save Pebblo/be4297f8a3b99fc59e45bd00d94254b3 to your computer and use it in GitHub Desktop.
<?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