WordPress.org

Ready to get started?Download WordPress

Forums

the_excerpt doesn't excerpt (2 posts)

  1. Kaz2
    Member
    Posted 6 years ago #

    Trying to get the_excerpt to work in template. It shows only the excerpt if there is a defined excerpt. I thought it is supposed to automatically truncate the post to (pick one) 55 characters, 120 words or ?? I do not find concensus on this.
    Using ** `

  2. <?php the_time('M d') ?>. "><?php the_title() ?><?php the_excerpt(); ?>
  3. ` ** I get the full post in every case where there is not a specific excerpt which makes a pretty large page! Ia using WP 2.3.3.
    Probably simple, but I have read all the forum topics and seems most, or many people, have the opposite problem!
    Thanks,

  • Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Unless you've done something specifically to disable it, yes, the_excerpt will indeed fake it (55 words) unless there is an excerpt already there for that post.

    This is done by having this line in the default-filters.php file:
    add_filter('get_the_excerpt', 'wp_trim_excerpt');

    And by the wp_trim_excerpt() function in the formatting.php file.

    Plugins and themes may have disabled it in your case. Check those.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags