Viewing 4 replies - 1 through 4 (of 4 total)
  • Kafkaesqui

    (@kafkaesqui)

    Almost:

    <?php echo apply_filters('the_content', get_the_excerpt()); ?>

    One difference is a lack of paragraphs tagging *unless* we are talking about actual excerpts (using the optional excerpt field in the post editor). Excerpts extracted from the post content get a bit munged due to the string handling being done to detect the word count.

    And yes, apply_filters() used this way can be performed on just about anything. So for example, if you have a custom field value in a PHP variable:

    <?php echo apply_filters('the_content', $value); ?>

    Thread Starter Lindsey

    (@lalindsey)

    Sweet! That’s exactly what I wanted.

    Thanks so much!

    Thread Starter Lindsey

    (@lalindsey)

    This has stopped working on one of my blogs, does anyone know why, and what another option is? It just happened suddenly, no new plugins, and it still worked even after the update for wordpress that I did last month.

    This is the chunk of code I am using:

    <div class="video">
    <?php query_posts($query_string); ?>
    <?php query_posts('showposts=1&cat=10'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>; ?>"><?php the_title(); ?></a></p>
    <?php echo apply_filters('the_content', get_the_excerpt()); ?>
    <?php endwhile; ?>
    </div>

    Nothing changed on the theme side since the site launched, so I don’t know why it stopped working out of nowhere.

    version 0.20 of the plugin has a very very very beta override of the the_excerpt filter available.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Have the_excerpt display like the_content’ is closed to new replies.