• Apologies if this has been asked or suggested before–is there a way to add the functionality to have excerpts created, say, by setting a variable up in WP to automagically use the first x number of words in a post as the excerpt?
    Hmm…perhaps there is a hack for this? It would sure speed up the posting process. Also, I just want to be sure of something; is the excerpt basically for RSS feeds, or can it be used on a site where only the excerpt is shown and the whole post will only show when a reader selects the excerpt?
    Thanks, all!

Viewing 6 replies - 1 through 6 (of 6 total)
  • My (faulty, I’m sure) understanding of the_excerpt is that it’s used for RSS specifically.
    If in the second part of that last question you’re using ‘excerpt’ to mean essentially a ‘teaser’, this from the readme:
    ” For example <?php the_content(“read more”,”0″,”blah.php”) ?> would display a link to blah.php, with the link text read more, and won’t display the teaser message.
    To enter an extended entry, just type <!–more–> in your entry. The part before that comment is the teaser, the part after it is the extended entry. To force the extended entry not to show the teaser message, type <!–noteaser–> somewhere in your entry.
    To enter an entry with several pages, just type <!–nextpage–> in your entry to start a new page.”

    Thanks, Cena.
    Coincidentally, I was just writing a post and noticed that “Excerpt” was hyperlinked. I never realised that initially, so I guess I should mess around with the CSS for the GUI so that noobs like me can see this stuff! 🙂
    Anyway, I found out that if I don’t write an excerpt, then WP will do it for me. Also, there is a way of putting in a teaser, like you mention, to force the reader to click on articles of interest to get at the body of the post. This is good and bad, I suppose. Depends on the quality of your titles to attract readers, I guess. Not sure how Search Engines would handle that either.
    Dang, there’s so much to learn. I gotta spend the weekend reading through more of the WP stuff. It’s so cool to learn something new every day!

    I think there is no option for setting the number of words that contain the excerpt. But you can hack the the_excerpt function at wp-includes/templates-function-post.php. Default setting is 120 I think.

    For what it’s woth, the code on this page also worked for me. I spent a bunch of time searching the Support archives and looking through the Wiki and so forth, and much of it was confusing, especially references to the <more> tag, which I could never figure out. Anyhow, the code replacement suggested above seems to work.

    I don’t know if this fits in this thread, but in a site I made I couldn’t get the teaser/more etc. thing working (and that hasn’t changed), but I somehow solved it by inserting this code:
    } else {

    So in the case of a page with posts the excerpt is shown first, and clicking on the link the full post. If no excerpt present the full content is shown right from the beginning.
    But I still don’t understand why the ‘more’ tag isn’t working…

    Just to note, there is a ‘condensed content plugin’ (http://manalang.com/archives/2004/06/20/wordpress-plugin-condensed-content-for-date-and-category-archives) that will let you set how many words to show and then link to the rest. Works on the search and archives pages, and it was easy to tweek to work on the index page as well. Note- it does strip all tags, which is sort of necessary, but can be ugly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Excerpts’ is closed to new replies.