' . get_the_excerpt() . '
';
$output .= '
';
if ( get_theme_mod( 'personaltrainer_service_enable_title', 1 ) ) {
$output .= the_title( ' ', false );
}
$content_show = get_theme_mod( 'personaltrainer_service_show', 'excerpt' );
if ( 'excerpt' === $content_show ) {
//Show Excerpt
$more_tag_text = get_theme_mod( 'personaltrainer_excerpt_more_text', esc_html__( 'Continue reading', 'personal-trainer' ) );
$output .= '
';
$output .= '
', '
';
} elseif ( 'full-content' === $content_show ) {
//Show Content
$content = apply_filters( 'the_content', get_the_content() );
$content = str_replace( ' )]>', ' )]>', $content );
$output .= '
' .wp_kses_post( $content ) . '
';
}
// Default value if there is no first image
$image = trailingslashit( esc_url ( get_template_directory_uri() ) ) . 'assets/images/no-thumb-760x760.jpg" >';
if ( has_post_thumbnail() ) {
$image = get_the_post_thumbnail_url( $post->ID, 'personaltrainer-service' );
}
else {
// Get the first image in page, returns false if there is no image.
$first_image = personaltrainer_get_first_image( $post->ID, 'personaltrainer-service', '', true );
// Set value of image as first image if there is an image present in the page.
if ( $first_image ) {
$image = $first_image;
}
}
$output .= '
' . the_title( '', '', false ) . '
';
$output .= '