Custom Thesis teasers

/ Published in: PHP
Save to your folder(s)

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.

Copy this code and paste it in your HTML
  1. function teaser_excerpt() {
  2. $teaser = get_post_meta(get_the_id(), 'custom_teaser', true);
  3. thesis_teaser_date();
  4. echo ' <div class="format_teaser entry-content">' . "\n";
  5. if ($teaser)
  6. echo '<p>' . $teaser . '</p>';
  7. else
  8. the_excerpt();
  9. echo ' </div>' . "\n";
  10. thesis_teaser_link();
  11. }
  12. add_action('thesis_hook_after_teaser_headline','teaser_excerpt',99);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.