Display all child posts in a custom post type, grouped by a custom taxonomy site
Display all child posts in a custom post type, grouped by a custom taxonomy site
Display all child posts in a custom post type, grouped by a custom taxonomy site
Try using: ‘orderby’=>’distribution_list last_name’, ‘order’=>’ASC’ Instead of: ‘orderby’ => array( ‘distribution_list’ => ‘ASC’, ‘last_name’ => ‘ASC’, ), So: $users = new WP_User_Query( array( ‘meta_query’ => array( ‘relation’ => ‘AND’, ‘lastname’ => array( ‘key’ => ‘last_name’, ‘compare’ => ‘EXISTS’, ‘type’ => ‘CHAR’, ), ‘list’ => array( ‘distribution_list’ => array( ‘key’ => ‘distribution_list’, ‘value’ => ‘”72″‘, ‘compare’ … Read more
Could you use “count” ? $cars=array(“Ford”,”Chevy”,”BMW”); echo count($cars); The above would give a count of “3” So in your code, count the number in the query array and IF greater than “X” then return the query.
Sort Posts Alphabetically Based on Specific Category (Divi)
Okay, I muddled around until I found what I feel is the best solution. Please feel free to offer any constructive criticism. I concluded this was not possible with a single query, so I broke it into two queries. The basic idea is to get all items matching each query, loop them to build an … Read more
The user password (stored as an MD5 hash) can be retrieved like so: $users = get_users(); foreach ( $users as $user ) { $password = $user->user_pass; } Assuming you have some known value for passkey, you can hash it and compare it to each user’s password: $passkey = ‘somestring’; $hashed_passkey = md5( $passkey ); $users … Read more
A Depth Like Parameter For “get_posts”
You can’t change the DESC to ASC “within the IF statement”. The query has already ran at that point. I don’t really understand what the code is meant to do though. I don’t really see that code ever producing the pattern you describe. Specifically, I don’t understand what the shortcode strings or for or how … Read more
wp_query order by rand is repeating posts
We can set the author_url argument of WP_Comment_Query as null (empty string will not work) to search for comments that don’t have an author url. Currently (ver 4.8.1) the has_author_url isn’t supported. Using a sub-query to exclude those comments, with no author_url, using comment__not_in, should work, but wouldn’t probably scale well. Setting fields as ids … Read more