WordPress Tweaks & Tuts?

Subscribe to TheCreatology via RSS | Email

Tutorial to change Excerpt Length Size of Teaser in Thesis Theme

by Aky Joe

You must be wondering when Thesis Theme offers great features, why there is no feature to adjust excerpt length on homepage ? Same question knocks my mind too, but I couldn’t find a good reason to it. Instead, I found an alternative to adjust teaser post length and in this article we will learn how to change excerpt length of teaser in thesis theme.

Change Teaser length in Thesis Theme

Post Excerpt of Teaser in Thesis Theme

But before we go ahead with the tutorial, I recommend you to update Thesis Theme. Don’t know how to do that ? Well, it is simple, just refer to article Safely upgrade to latest version Thesis 1.8 ? If you don’t have Thesis Theme Copy then you can also Download Thesis Theme.

Analogy behind Excerpt Length of Teaser

One thing I like about customizing WordPress, is its filter feature, with which you can override any default function of WordPress. So, analogy behind adjusting excerpt length is too using WordPress filter and overriding it with another filter with new parameters.

Change Excerpt Length in Thesis Theme

To change excerpt length on homepage, add the below code in custom_functions.php in Thesis Theme.

NOTE: Make sure you take full backup of custom_functions.php file using FTP before modifying it or you can also refer to the article about how to safely edit custom_functions.php

// Teaser Length
function teaser_length($length) {
 return 70;
add_filter('excerpt_length', 'teaser_length');

Once you have added above code in custom functions, refresh the website homepage and look for the teaser length. If it doesn’t satisfy you, simply adjust value on line number 3 of above code depending on your need.

With this we come to end of this simple tutorial where we learned how to adjust excerpt length in Thesis Theme. If you have any query or further assistance is required, post your feedback as comment below.

Similar Topics: ,

TheCreatology Support

Got a Query? We're ready, Just Say it!

If you have a doubt or a feedback, then get-in-touch with TheCreatology Support Team now.

Start a Hangout or Email Us

Are you looking for...

  • Logo Design
  • Web Development
  • Thesis Skin Design
  • Graphic Designing
  • Virtual Assistance
Hire Us!


{ read them below or add one }

Anthony Ryan February 10, 2012 at 3:50 pm

Great tutorial. Simple but very useful.


Steve April 7, 2012 at 1:24 am

Thanks for this info guys. I tried it and there was no code crash or problems with admin or anything but the posts simply do not change to excerpt form. Any ideas what I am doing wrong?


Aky April 7, 2012 at 4:56 pm

The above code filter is applied to excerpt_length function only. If you have turned on the Featured Teasers from the Thesis Design Options, then it will not work. Reason behind this is that Featured Teaser doesn’t use Excerpt Function, but the Content Function.

Reference: http://www.thecreatology.com/ease-with-thesis-wordpress-theme-design-options-panel.html


Dave Jackson April 11, 2012 at 6:44 pm

Unfortunately you’re confusing post excerpt length with teaser length. The way your code reads you adjust everything – home page post excerpt along with any teasers present on the page. What most people are looking for is a way to lengthen the feature post without affecting the length of the teasers.


Doug July 13, 2012 at 10:48 pm

Crashed my site, not good.


Aky Joe July 13, 2012 at 11:25 pm

I wonder how can a simple 4 line code, crashed your website. What was the error by the way ?


Kebaya Modern April 1, 2015 at 8:45 am

what does 70 Means in the line 3? does it characters or words?


Leave a Comment

Previous post:

Next post:

Contact Aky

Yes, I agree that all information above is valid.

Simple question, what's...