$layout_id = st()->get_option('hotel_search_result_page', true); $image_attributes = wp_get_attachment_image_src($thumb, array(800, 600)); $link = esc_url(add_query_arg(array('location_name' => get_the_title(), 'location_id' => get_the_ID(), 'post_type' => $post_type, 's' => '', 'layout' => $post_type == "st_hotel" ? $layout_id : ''), home_url())); ?> <div class=""> <div class="thumb"> <a class="hover-img" href="<?php echo esc_url($link); ?> "> <?php if ($image_attributes) { ?> <?php echo STLocation::scrop_thumb($image_attributes[0]); ?> <?php } ?> <div class="hover-inner hover-inner-block hover-inner-bottom hover-inner-bg-black hover-hold"> <div class="text-small"> <h5><?php the_title(); ?> <?php echo esc_attr($post_type_name); ?> </h5> <p><?php