<![CDATA[
With millions of individuals and businesses worldwide using open source content management systems (CMS) for their websites there’s a definite trend of frequently asked questions being emailed into the Media Street website design office. As a result we’re starting a new category to deal with common problems and questions when it comes to WordPress. This is the first question we’re answering.
As we’ve all probably seen, WordPress has a summary facility to shorten content so as to use it in search results, headline news etc. this is what’s called an excerpt. This excerpt has a default setting of two paragraphs. How do we change it though and what is the code exactly?
add_filter(‘excerpt_length’, ‘my_excerpt_length’);
function my_excerpt_length($length) {
return 30; }
NB: 30 is the number of words in the summary / excerpt. Change this as you wish.
Now that you’ve got the summary feature customised and available for use, why not go ahead and enter it on to a template within the WordPress loop area of the template. Below is an example of the WordPress Loop which is integrated with the Excerpt facility.
<a