Change excerpt length in twenty ten theme (modified) (4 posts)

  1. matt-tyas
    Posted 4 years ago #


    I cannot work out how to get my excerpts to limit their character length in a theme I modified from twentyten.

    Here is the functions.php code: http://pastebin.com/7xTRJkYZ

    Here is the front end code for displaying one post in the loop-index.php file: http://pastebin.com/AQ3WYyC6

    I am total stumped as, the excerpt at present does not limit the length at all, you can put an essay in the excerpt input and it all displays.

    Thank you for your help.


  2. keesiemeijer
    Posted 4 years ago #

    Manual excerpts (the one you fill in on the edit Post screen) are shown in full. If a Post doesn't have a manual excerpt the post content will be shortened to 55 words and stripped of all HTML.

    Your code works on my testsite for automatic excerpts.

    Try one of these functions if you want it to affect the manual excerpts too:

  3. matt-tyas
    Posted 4 years ago #

    Oh I see it is case of me not understanding the default functionality!
    I think I can solve my problem now.

    Thank you.

  4. keesiemeijer
    Posted 4 years ago #

    No problem. It's all a bit confusing. Glad you got it resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic