• Resolved thetanooki

    (@thetanooki)


    I know nothing about creating new functions, but I’m wondering if it’s possible to basically re-create the the_excerpt function but with another name.

    I’d like to use the_excerpt for most posts, but I’m using WP Post Thumbnail 0.2 Beta 2, which automatically inserts thumbnails into my excerpt. However, on my “static” home page, I’ve set it to display the most recent post with a large image instead of a thumb, but I’d still only like it to show an excerpt of the text underneath. I can’t call the_excerpt without it wanting to also insert the thumbnail.

    Is there a way I can create a second form of the excerpt? Basically recreate the original in terms of function, just with a different name? I assume someone would have wanted this before, perhaps maybe to change up the excerpt length from time to time, post to post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not sure about what the plugin is doing to your excerpt, but if using a ‘standard’ post loop you could just do:

    <?php
    echo $post->post_excerpt;

    ?>

    Thread Starter thetanooki

    (@thetanooki)

    Thanks! That seems to do the trick ??

    As for the plugin, it’s designed to auto-insert at the beginning of the_content when it’s on the homepage. I use excerpts, though, but I was hoping to just manually insert the thumbs into my theme as I pleased – unfortunately the code provided doesn’t work, and it’s supposedly due to the plugin not being 100% compatible with 2.8.4, and the developer has been MIA since May, I think. In the meantime, I just changed the_content to the_excerpt, since I use thumbs on most of the excerpts.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create an alternate/second type of excerpt?’ is closed to new replies.