Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Wordpress states the following:

An excerpt is a condensed description of your blog post and refers to the summary entered in the Excerpt field of the Administration > Posts > Add New SubPanel. The excerpt is used to describe your post in RSS feeds and is typically used in displaying search results. The excerpt is sometimes used in displaying the Archives and Category views of your posts. Use the Template Tag the_excerpt() to display the contents of this field. Note that if you do not enter information into the Excerpt field when writing a post, and you use the_excerpt() in your theme template files, WordPress will automatically display the first 55 words of the post's content.

I wrote a post of 164 words.

And placed this into my posts page:

<div class="mainbar">
            <?php // Create custom loop
            $custom_posts = get_posts('post_type=page_content&page_sections=Content (Front Page)'); ?>
            <?php foreach( $custom_posts as $post ) : setup_postdata( $post ); ?>
                <div class="content-block">
                    <h2><?php the_title(); ?></h2>
                    <?php the_excerpt(); ?>
                </div><!-- .content-block -->
            <?php endforeach; ?>
            <?php wp_reset_query(); ?>
        </div><!-- #mainbar -->

I'm still seeing 164 words in that post.

EDIT:

This is what I've written in the post:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat

.

I tried exceeding 55 words in other post and it is the same story.

Any suggestions?

share|improve this question
    
Is issue with single specific post or with all posts? Please add example content or link to it, if possible. –  Rarst Jan 28 '11 at 12:01
    
@Rarst It happens the same in every post. I added an example (EDIT). There's should be something wrong in my loop or the admin panel. –  janoChen Jan 28 '11 at 12:11

1 Answer 1

up vote 2 down vote accepted

Hi @janoChen:

Are you sure that code it running and not some other code? I just traced through the code and the only way it's going to do that is if you have a plugin or code in your theme that is hooking one of the following hooks: 'the_excerpt', 'get_the_excerpt', 'wp_trim_excerpt' or possibly removed the 'get_the_excerpt' hook that calls wp_trim_excerpt().

What plugins or other code to you have installed?

share|improve this answer
    
Yes, I had that problem you mentioned, already solved it. Thanks. –  janoChen Jan 28 '11 at 12:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.