Display Author name PHP (Selfmade Plug-IN)

Your $my_post array contains ‘post_author’ => $user_ID, but $user_ID isn’t defined. According to WP codex, get_currentuserinfo is deprecated, and should be replaced with wp_get_current_user. But in this case you want the ID, so a better option would be get_current_user_id So if you replace this line: get_currentuserinfo(); With: $user_ID = get_current_user_id(); You should be in business.

wp_query with multiple arguments with AND

You want to use the newer meta_query methodology… You establish a meta_query and then use arrays for the different conditions you want met, preface them with the relationship relation => ‘AND’ or relation => ‘OR’ $loop3 = new WP_Query( array( ‘posts_per_page’ => 10000, ‘post_type’ => ‘volunteers’, ‘meta_query’ => array( ‘relation’ = ‘AND’, array( ‘key’ => … Read more