• the following is the definition that wp gave about excerpt but it is still not very clear to me. can someone explan this to me? thanks
    Excerpt
    This field gives you the ability to manually craft a summary or description of your post. This will be used as the description for the post in the RSS feeds, and will utilized in the future for any place where a short excerpt of the post is necesarry, such as search results or monthly archives. If you dona€?t put anything here an excerpt will be automatically generated from the first number of words from your post itself. You can access this field using the template tag the_excerpt(). This should not be confused with extended entry functionality.

Viewing 10 replies - 1 through 10 (of 10 total)
  • In the Advance Edit of the WPAdmin area, there’s an additional field called Excerpt that you can fill in. It’s can be used for different things. Mostly it’s used to provide a synopsis about the post. I use it as a sort of mini-intro or tag line for the post — well I used to… I haven’t put it back into my current template.
    TG

    Thread Starter Anonymous

    TG…
    so what goes into the excerpt does not show up with your post?

    No, not automatically. There’s a separate call the_excerpt(); that displays the excerpt. Now, that’s provided you’ve entered an excerpt. On those occasions where you don’t enter an excerpt then a portion of the begining of the post is returned as the excerpt.
    TG

    How do I set the number of words in the excerpt? I have not entered an excerpt for each post but would like to use it to display, say, the first 20 words of a post. How do I do this?

    Funny you should ask this…. I was just in the function that does this. Unfortunatly it can’t be set by option or by a parameter passed in. It can (at least as of 1.2Mingus) only be set by modifying the code.
    Open wp-includes/template-functions-post.php … find the line get_the_excerpt — it’s a function, so if yo usearch specificaly for “function get_the_excerpt” you’ll find it.
    In it is the following line:
    $excerpt_length = 120;
    Change the 120 to the number of words you would like to have displayed.
    Save it. And that’s it. If you want finer control, let me know, I’ve got a plugin, that with a little bit of tweaking can return a specific number of characters, words or even sentences (and paragraphs too I think).
    TG

    You can easily change the function and use “echo get_the_excerpt(true, ’20’)” by deleting:
    $excerpt_length = 120;
    and change the function to:
    function get_the_excerpt($fakeit = true, $excerpt_length = 120)

    Thanks, guys… I used Techgnome’s suggestion and my site’s looking much better.

    Hi. Since we’re on the question of excerpt tweaking, is there some easy way to disable them altogether–to publish the content in the archives, specifically, rather than the excerpt? I really need the HTML markup to stay in the arhive pages (and perhaps also in the feeds, etc.) Thanks!!

    Hey all, on this same topic, is there any way to create some sort of call in the admin that automatically populates the excerpt box with X number of words or characters?

    I think you just read the instructions in this thread.

    If you want more than the default 120 words, change 120 to what you want. Want less, change 120 to less.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘excerpt question’ is closed to new replies.