WordPress.org

Ready to get started?Download WordPress

Forums

Limiting how much of a post is displayed (9 posts)

  1. djmaru
    Member
    Posted 7 years ago #

    I saw a template that cut off how much of a post was shown on the homepage. How do I specifiy this in another template?

    THanks

  2. Chris_K
    Member
    Posted 7 years ago #

    Modify the template files to use the_excerpt and/or the_content as necessary.

  3. djmaru
    Member
    Posted 7 years ago #

    cool, i did this. however, the format of my posts are lost....bolding, line breaks, ect.

    anyway to keep those in tact?

  4. Chris_K
    Member
    Posted 7 years ago #

    As you noticed when you read up on the_excerpt, it removes a lot of formatting.

    If you want a bit more flexibility, have a look at the the_excerpt_reloaded plugin. It gives you the option to modify the excerpt length and keep assorted html tags (including img).

  5. djmaru
    Member
    Posted 7 years ago #

    thanks. i have it installed and in my template, however when i click on the "read more" link it just links to a separate page that's still excerpted. shouldn't it display the entire post? i asked on that page, but thought you might know as well.

    thanks

  6. vkaryl
    Member
    Posted 7 years ago #

    There's a lengthy page of "how-to" on KafkaesquĆ­'s site where you got the plugin. I'm sure it addresses that situation there somewhere.... For one thing, the plugin defaults to "the_excerpt" - so you're going to have to read the documentation on the page thoroughly, so that you can "undefault" the stuff you want changed.

  7. Chris_K
    Member
    Posted 7 years ago #

    It sounds like your theme doesn't have a single.php? If it doesn't, copy index.php to single.php and use the_content instead of the_excerpt or the_excerpt_reloaded.

  8. djmaru
    Member
    Posted 7 years ago #

    yes, thank you Handysolo. that was the problem. however, my pages are still excerpted. is there a way to fix that?

  9. Chris_K
    Member
    Posted 7 years ago #

    Your theme must be doing everything with index.php, eh?

    Same deal - copy index.php to page.php (see Pages for a bit more on Pages and themes)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.