Forums

Call for the_excerpt() does not display the actual excerpt (11 posts)

  1. db0
    Member
    Posted 2 years ago #

    Hello all, I have a bit of a weird issue. I'm modifying me theme to show the_excerpt on each single page's sidebar. The idea is to show the excerpt if it exists, or some generic comment if it doesn't. The code I've added is this:

    <?php if ($post->post_excerpt) the_excerpt(); else { ?>
    <p><?php _e('You&rsquo;re currently reading an entry written by ','hemingwayex'); the_author(); ?></p>
    <?php } ?>

    And this almost works. What happens that when there is an excerpt, instead of the actual custom excerpt I've written, WordPress displays the generic snippet it always does when there is no actual excerpt (ie the first 120(?) words with a "[..]" in the end.

    You can see this here: http://dbzer0.com/blog/reddit-sorta-censors-atheism

    The weirdest thing is that on a test site I have, this works as it should, with the custom excerpt displayed as it should be.

    You can see the whole source of the single.php 9and the rest if you wish) from the svn repo.

    All help appreciated.

  2. db0
    Member
    Posted 2 years ago #

    Bump?

    [do not bump topics!]

  3. Peter Boosten
    Member
    Posted 2 years ago #

    how about plugins?

    Any plugins (or functions) modifying the the_excerpt() function?

    Peter

  4. db0
    Member
    Posted 2 years ago #

    That's a possible solution but it's going to be difficult to trace...

    I'll take a look and see. Thanks.

  5. Peter Boosten
    Member
    Posted 2 years ago #

    but it's going to be difficult to trace...

    Nope, not that hard.

    Look in the plugins and functions.php (in your theme directory) for this code:

    add_filter('the_excerpt'

    Peter

  6. db0
    Member
    Posted 2 years ago #

    Got it! It was the organize series plugin. I'll inform the dev. Thanks for all the help everyone.

  7. nerrad
    Member
    Posted 2 years ago #

    There are problems with the way I handled the_excerpt when coding the newest version of Organize Series. I'm working on a fix - no eta on when it will be out but in the meantime you can try what some users have posted in this thread

  8. nerrad
    Member
    Posted 2 years ago #

    This should be fixed in the latest version of Organize Series (2.1.2)

  9. db0
    Member
    Posted 2 years ago #

    Not exactly. Now instead of getting the default context (as if none existed) I get no output at all.

  10. nerrad
    Member
    Posted 2 years ago #

    hmmm... Do you have any other plugins that hook into the_excerpt or the_content? Other's are reporting the bug with Organize Series fixed...

  11. db0
    Member
    Posted 2 years ago #

    Yes, I have a few which hook into the content to add some extra stuff and my theme uses the excerpt (but doesn't modify it).

    Commenting out the line add_filter('the_excerpt', 'add_series_meta_excerpt'); worked again though.

Topic Closed

This topic has been closed to new replies.

About this Topic