Get author ID with attachment ID
Back in the day I wrote a function to check for that (you can put it in functions.php and call it from your page): public function check_if_user_is_author($user_id, $post_id) { global $wpdb; $res = $wpdb->get_results($wpdb->prepare(“SELECT * FROM ” . $wpdb->posts .” WHERE ID = %d AND post_author = %d LIMIT 1″, $post_id, $user_id)); if(isset($res) && count($res) … Read more