Exemple #1
0
/**
 * Clean up excerpts.
 */
function ameris_trim_excerpt($text, $num_words, $more, $original_text)
{
    global $post;
    $old_text = $text;
    if (is_front_page()) {
        $text = ameris_limit_by_char($text, 140);
    } else {
        $text = ameris_limit_by_char($text, 150);
    }
    if ($text !== $old_text) {
        $text .= '…';
    }
    return $text;
}
            $title .= '...';
        }
        echo $title;
        ?>
</a></h2>
				<div class="featured-video__date meta">Posted <?php 
        the_time('m.d.Y | h:i a');
        ?>
</div>
				<?php 
        if ($summary = get_field('video_summary')) {
            ?>
					<div class="featured-video__excerpt">
						<?php 
            $summary = strip_tags($summary);
            $new_summary = ameris_limit_by_char($summary, 275);
            if ($new_summary != $summary) {
                $new_summary .= '...';
            }
            echo $new_summary;
            ?>
						<a class="read-more" href="<?php 
            the_permalink();
            ?>
">View video</a>
					</div>
				<?php 
        }
        ?>
			</div>
		</div>