How to combine two get_users() array?
The $q1 and $q2 are working well individually.
The $q1 and $q2 are working well individually.
I am using get_users() to return a list of users with specified roles. The purpose of this is to generate a dropdown on the front end to mention other users in comments, very similar to the functionality of https://wordpress.org/plugins/comment-mention/.
I am trying to display some random users on the page. It is changing the order of the users it is showing, but it is only showing the same users instead of randomizing from all users in the database.
For each user on my site I store a birthday using ACF date field (stored as YYYYMMDD).
Is there a way to construct a meta query to retrive all users that their birthday on that specific month regardless of the year?
I am running this simple conditional statement on my plugin page:
How to display list of replies to his comments in user profile of current user. my website can send notification that example: “someone replied to your comment” and when i click the link that was sent by notification email it forward me to comment page. i also want to list these replies in user profile.
thanks for attention
I have pagination with next/previous links but I also would like to show numbers so the user can click on 2, 3, 4 etc. Pagination seems more tricky with WP_User_Query as there isn’t any default WordPress pagination for this as far as I know. The below works correctly as far as I can tell for the next and previous links.
I want to get the user ID that is currently logged in.
I did it successfully when accessed via a web browser. However, when this function is called via dialogflow as webhook / fulfillment it always returns ID = 0.
This is my full code in PHP.
I need to create a search page that will display anything related to the supplied search.
i.e. comments containing it, events, posts, CPTs and users with that name.
The below code achieves what i need for given ID = 200.