• Please, there is a way to show the excerpt between the post title and the text, like a ‘lead’ in a newspaper?

Viewing 2 replies - 1 through 2 (of 2 total)
  • In the single post itself? Or on the front page?

    Or do you want to “highlight” the first few paragraphs that would be in the “excerpt” so people don’t have to read it twice? Or do you want a custom excerpt to show and then the article to follow, like the newspapers do?

    Check this out, maybe: https://guff.szub.net/the-excerpt-reloaded

    If you actually are *using* the excerpt field in posts, just place the_excerpt() template tag on a line in your theme templates (inxed.php, single.php, etc.) just above where the_content() resides. For example, here’s a mod of the default theme’s index.php:

    <div class="entry">
    <?php the_excerpt(); ?>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>

    If you don’t want it to display when no excerpt exists (if not, it repeats the first 120 words or so of a post’s content):

    <div class="entry">
    <?php if($post->post_excerpt) the_excerpt(); ?>
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show excerpt before posts’ is closed to new replies.