Support » Themes and Templates » the_excerpt showing the whole post

  • Hey there,

    I’ve got a theme i’m developing and we had the_excerpt working correctly and when i went back to work on some more code it appears to have stopped working. It shows the whole post.

    Here is the code in the theme file:

    <?php query_posts('cat=27&showposts=1'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="block-weather_watch_extras-0" class="block ">
            <h2 class="title"><a href="<?php the_permalink(); ?>">
              <?php the_title(); ?>
              </a>  </h2>
              <a href="<?php the_permalink(); ?>"><?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    } ?></a>
    <?php the_content('<br /><br /><span class="readmore-icon">Read the rest of '. get_the_title($post->ID). '</span>', TRUE);?>
            <?php endwhile; endif; ?>

    and this one is in the functions file.

    function custom_excerpt_length( $length ) {
    	return 24;
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    Thanks for your help ๐Ÿ™‚

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘the_excerpt showing the whole post’ is closed to new replies.