I think it’s arguments issue.
I recommend not to use role
& role__not_in
together rather either use only role
OR use role__in
& role__not_in
combination. Also check your role
param spelling. (see more on role)
2ndly orderby
param rand
is not valid according to codex (see here) so use proper param.
Related Posts:
- Why does get_users suddenly return duplicates?
- Nice way to print_r arrays
- WordPress: How to use post_class() in an echo
- How do I pass an array as an argument to a WP-CLI command?
- Passing a variable into Contact Form 7 [closed]
- How do I properly format the user_role array?
- Comma seperated list of ID’s as an array?
- update_post_meta from data in multidimensional array created from a form
- post__in works but also prints the word Array
- settings api store multiple array
- if is_singular array not working as expected
- How do I update a specific object in an array, in user meta?
- Get posts id in array by meta value and key
- Sort a custom post type array numerically
- How to add day number and initial to my post graph?
- How to validate register settings array
- Problem with wp_update_post
- Replace text inside a huge multidimensional array
- How to use IN array properly in WordPress?
- WordPress Plugin Dev: Using array for WP options
- Only a part of array is stored in transient – what could be causing this?
- update_post_meta() with a modified array?
- Remove admin menu links for multiple users by email
- How pass a 0 in $atts?
- How to save data of an input field to an array
- Retrieving multiple values to the Post Meta (using an array)
- Stuck with a Custom Field Check box Array
- Compare with WP Meta Query
- How to Translate a string of an array inside a class?
- How to pass conditional array to wp_localize_script
- Modify foreach loop for social sharing links?
- Combine get_page_by_title to exclude pages from wp_list_pages
- Selecting and outputting results from DB with an array
- Struggling with array and foreach loop
- Update post meta does not serialize array
- How to use json_decode a post_meta value? [duplicate]
- How to decipher the following array
- How to display line breaked meta values in table?
- Organizing and grouping an array by year
- array_filter warning – wp-includes/post.php line 3148
- Hide sidebar if post_type is in array
- Array in meta key?
- Obtaining values from objects
- Check if user has comment on current post
- Foreach loop inside an array_merge
- How to get user ID’s from multiple usernames?
- Matching slug terms from one array to those in array of WP_Term objects to output term names
- Print specific values stored in a post meta array
- WP Page Options Array
- Array is not working in Filter?
- Get current user array into hyperlink
- return paginate_comments_links() as array
- Inserting a random number into an array [closed]
- Random element in get_post_meta array
- update_user_meta duplicates entry
- Add formatting to Array
- Taxonomy terms not properly displaying as array
- WordPress, result array of ‘post_name’
- How can I display Only the first Array/Object?
- Why are array_slice() and array_chunk() not working?
- Retrieve array items without page ID
- How do i fix this “call_user_func_array()” error
- How can I get the content of the current page in my loop while merging post-type
- wp_insert_post($post), add an array of values with update_post_meta
- update_post_meta adding to array instead of replacing value
- How to output get_tags array list to select box
- How to add each letter, entity, special character from post title to array
- Strange Behavior with update_option
- wp_update_post to set post IDs to drafts not working
- How i can extract data
- Show Tags of Custom Post Type outside of Loop
- “Undefined variable: array” Error In Displaying Post Tag
- wp_set_object_terms not accepting variable array
- How do I pull post from standard post format?
- Output checkbox per user and save in plugin options
- WPML admin texts with serialized objects
- List users of specific role instead of removing them with specific role
- The writing ( with foreach) of the keys of an array of objects to a new array produces fatal error
- Create dropdown menu of all tags used in category
- Use $wp_customize->add_control to create a selectable “Designed/Powered By” choices select w/ link in footer?
- Get current user array with post string
- Echo the key from a select-box in Array with get_option (Settings API)
- Updating wordpress user meta data array (unexpected multiple arrays)
- update_post_meta array issues
- Update Post Meta for Arrays — Remove/Replace Single Value from Multi Dimensional Array
- Get custom_user meta value and add entry
- How do I retrieve a value from a multi – dimensional array using get_post_meta? [duplicate]
- How do I retrieve an array from wp_postmeta with get_post_meta?
- post custom values
- Accessing array elements (get_pages)
- Printing out JSON array returned [closed]
- How to check if the postID is in an array? [closed]
- Fatal error in my WP
- SQL query add only posts with custom field to array
- Combine two foreach Arrays into one table row
- How to match data in multidimensional array of post_meta_data?
- Populate Array with values from another arrray [closed]
- how to separate array with commas? [closed]
- JSON webhook WP Automator – Help with Syntax [closed]
- Multipe array in meta_input