Getting 500 Error While Trying to Display Wordpress Thumbnail

whant to display wordpress thumbnail in loop but when i try i always get 500 error and nothing is working. Please can you help me to solve this problem. public function...