Here is what I did and it worked for me:
$current_day = date("d");
$current_month = date("m");
$args = array(
'orderby' => 'login',
'order' => 'ASC',
);
// The Query
$user_query = new WP_User_Query( $args );
// User Loop
if ( ! empty( $user_query->results ) ) {
foreach ( $user_query->results as $user ) {
if ( $user->birth_date['day'] == $current_day &&
$user->birth_date['month'] == $current_month )
{ echo '<span>' . $user->display_name . '</span>'; }
}
}
Related Posts:
- WP_User_Query to exclude users with no posts
- WP_User_Query will not combine meta + normal search methods
- WP_User_Query users by registered date
- User appears twice in a WP_User_Query
- Want to add my custom prepare query but add_filter doesn’t run
- each_connected in wp_user_query with Scribu’s Posts to Posts Plugin – Alternative method? [closed]
- Sort WP_User_Query by meta_key value with pre_user_query
- WP_User_Query Custom Field meta_query with Date clause
- Ordering WP_User_Query results by the user IDs used in the include parameter
- Get users in query and limit user output to five in random order
- Echo the number of users using WP_User_Query?
- Query Users by login, meta & role
- Basic Wp_user_query not finding any users
- Modify user table search results
- WP_User_Query not displaying any user [closed]
- Is it necessary to escape LIKE term in WP_User_Query?
- Exclude Users of a Certain Role in the Users Page
- Save users last visited blogs within whole network
- Snippett for create field in registration for users
- WordPress WP_User_Query($args) using Where and Like
- WP_User_Query unexpected output after upgrading toWordPress 4.0.1
- WP_User_Query Filter Results
- custom post type ‘pre_[cpt]_query’ hook
- Can you return users of a higher role than the current user using get_users()?
- WP_User_Query with 2 sets of conditions ‘AND’
- unable to modify user table search results based on meta key
- Wp_user_query search by meta_key not returning any results
- WP_User_Query is Not Displaying Results
- How to search for (partial match) display names of WordPress users?
- List users by last name in WP_User_Query
- Query users by custom taxonomy and user role
- How to order WP_User_Query results to match the order of an array of user IDs?
- Searching users with WP_List_Table plugin
- WP User Query with search columns and meta query
- Wp_User_Query not sorting by meta key
- pre_user_query meta_query admin user list
- Check if WP_User_Query ‘include’ is empty
- Get Y random authors’ ID/Object with more than X number of posts
- WP CLI – show users whose ID is larger than given ID
- Users instead of posts: How to modify the main query?
- How to use search_columns in WP_User_Query?
- User Relationship
- How to query users who have empty first_name?
- WP User Query fails when searching meta queries and search columns
- WP_User_Query unable to retreive all user at once
- Query users by capability – uninstall/deactivate callback
- Get users between user ids
- WP_User_Query pulling ACF to loop
- Parent User and Child User – relate users
- WordPress search posts by author name with autocomplete
- Four columns in the wp_users table
- how to know when the user is in specific part of the website and when he leaves that part and display the data in the admin dashboard
- pagination with numbers for WP_User_Query
- Why get_users() not working on the admin backend?
- What’s the proper way to add users to my site in order to test things?
- Is there a maximum limit of the number of users returns by WP_User_Query?
- Passing args to WP_User_Query am I using meta correctly?
- How to activate the user search
- Conditional IF statement not returning true even though echo of $user->province is correct
- Randomize Users
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- last_name + first_name orderby with meta_query [solved]
- Dokan Marketplace store link in single product page
- array of meta values using WP_User_Query
- How to properly use AND / OR in custom search
- Add Watermark to PDF’s of logged in user in WordPress upon upload to media library [closed]
- WP_User_Query and user posts
- construct complex queries with WP User Query
- Change users.php WP_User_Query
- WP_User_Query orderby meta_val_num
- Combining two meta_values within one row with query
- Is it possible to use WP_USER_QUERY to search by username using a wildcard? [closed]
- WordPress get last inserted user id
- User query – getting values for custom meta keys/fields
- Getting current user data with MySQL statement
- How do I echo all users’ display_name and their meta_value who have a certain meta_key?
- Wrong result in fetching User meta of WordPress
- Get a Post Loop based on Logged in User information into a Shortcode
- Query users and count totals based on meta values
- How to optimize the opening speed of admin panel?
- SQL to set Display Name to First Name + Last Name
- Getting user data via ajax
- Find count of WordPress users by role and search string for user name
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- Get label in user meta query
- Create a unique username with validation on wordpress registration
- WP_User_Query Orderby Not Working
- How to query 5 users in random who have published more than 10 posts
- WP_User_Query not searching numbers?
- Loop 1 user randomly
- How to order custom user list columns by datetime?
- How to fetch WP_User_Query with multiple role arguments [duplicate]
- How can I include user meta information in the resulting array of a WP_User_Query?
- Display Users from two roles in one list
- Paginate Links not working
- Sort users by custom user meta value
- Create Mashable Follow-like Facebook, Twitter login/connect?
- Shortcode for displaying the user’s first name?
- User Query Multiple Orderby Clause
- wp_user_query with meta_value_num for leaderboard