'; // Default value if there is no first image $image = ''; if ( has_post_thumbnail() ) { $image = get_the_post_thumbnail( $post->ID, 'alchemist-service', array( 'title' => $title_attribute, 'alt' => $title_attribute ) ); } else { // Get the first image in page, returns false if there is no image. $first_image = alchemist_get_first_image( $post->ID, 'alchemist-service', array( 'title' => $title_attribute, 'alt' => $title_attribute ) ); // Set value of image as first image if there is an image present in the page. if ( $first_image ) { $image = $first_image; } } $output .= ' '. $image . ' '; $output .= the_title( '', '', false ); //Show Excerpt $output .= ' ' . get_the_excerpt() . ''; $output .= '