/ Published in: PHP

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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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);
Comments
