Return to Snippet

Revision: 13565
at April 28, 2009 02:48 by kristarella


Initial Code
function teaser_excerpt() {
	$teaser = get_post_meta(get_the_id(), 'custom_teaser', true);
	thesis_teaser_date();
	echo '				<div class="format_teaser entry-content">' . "\n";
	if ($teaser)
		echo '<p>' . $teaser . '</p>';
	else
		the_excerpt();
	echo '				</div>' . "\n";
	thesis_teaser_link();
}
add_action('thesis_hook_after_teaser_headline','teaser_excerpt',99);

Initial URL


Initial Description
This provides a teaser, with content from a custom feild, or the excerpt if no field exists. Everything except the title and edit link need to be turned off in the options.

Initial Title
Custom Thesis teasers

Initial Tags
wordpress

Initial Language
PHP