';
// Default value if there is no first image
$image = '';
$layout = 'layout-three';
$thumbnail = 'cleanportfolio-featured';
if ( has_post_thumbnail() ) {
$image = get_the_post_thumbnail( $post->ID, $thumbnail, array( 'title' => $title_attribute, 'alt' => $title_attribute ) );
}
else {
// Get the first image in page, returns false if there is no image.
$first_image = cleanportfolio_get_first_image( $post->ID, $thumbnail, 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 );
$output .= '
';
} //endwhile
wp_reset_postdata();
return $output;
}
endif; // cleanportfolio_post_page_category_service