
WordPress: Adjust Twenty Twelve Summary Word Count
WordPress is one of the world's most popular CMS (Content Management System) for creating websites and blogs. Its ease of use, combined with a wide range of customisable features, makes it an ideal platform for users of all levels.
Among the features that many find useful are the summaries (excerpts) of posts, which offer a summary of a larger content. However, one of the aspects that may not meet the needs of every user concerns the default number of words in the summary.
If you are a WordPress site administrator or designer, it may happen that the default number of words in the summary does not suit your style or aesthetic vision. In this article, we will explore the importance of changing the number of words in the summary of a WordPress theme, why to do so, and how to customise it to optimise the user experience and improve content presentation.
What is the WordPress theme summary and how does it work?
The summary or ‘excerpt’ is a summary of the content of a post, which is used to display an overview of the content on the homepage, archive pages or widgets. WordPress, by default, creates a summary for each post by taking the first 55 words of the content. This number may seem adequate in some cases, but for many websites it may be too short or too long, depending on specific needs.
For example, if your blog is focused on in-depth articles, where the reader wants to have a more complete overview of the content, a summary of only 55 words might be insufficient. On the other hand, if your site hosts short and concise content, a summary that is too long may be superfluous or visually unpleasant.
Why is it important to change the number of words in the WordPress summary?
- Optimisation of the user experience: A summary should invite the user to continue reading the full post, but if too short or too long it can generate frustration or distraction. By adjusting the word count, you can adapt the summary to the type of content you are publishing, improving the overall experience for visitors.
- Alignment with site design: Each site has a unique design and layout that may require summaries of a different length to maintain aesthetic balance. If you have a site with a minimalist layout, you may prefer shorter summaries, whereas if your site is more text-oriented, you may prefer more detailed summaries. Changing the length of summaries allows you to customise the appearance of your site according to the design.
- SEO and click-through rate (CTR): Search engines, such as Google, pay attention to how content is presented on site pages. A summary that is too short may not provide enough information to improve SEO ranking, while one that is too long may appear cumbersome. Optimising the length of the summary helps to improve CTR, as it provides a clear and appealing view of the content without overloading the user.
- Theme customisation and branding: Every site has a unique audience, and summaries should reflect the tone and style of the site. If your blog is informal and discursive, it may make more sense to use longer summaries that entice the reader to find out more. On the other hand, a professional or corporate site might benefit from shorter and more direct summaries, in line with the philosophy of concise and targeted content.
How to change the number of words in the WordPress theme summary
There are several ways to change the length of summaries in WordPress. The best solution depends on your technical skills and the flexibility you wish to have in customising your theme. Here are some approaches:
1. Modification via the theme's functions.php file
If you are a bit of an expert in WordPress development, you can add a little code in the functions.php file of your theme. This code allows you to specify the exact number of words for summaries. Here is an example of code you can insert
function my_custom_excerpt_length($length) {
return 30; // Change ‘30’ to the desired number of words
}
add_filter(‘excerpt_length’, ‘my_custom_excerpt_length’);
In this example, the summary will be limited to 30 words. You can change the number 30 to any other number you wish to adapt the summary to the length that best suits your site.
2. Using an excerpt management plugin
If you do not wish to edit the code manually, you can use a WordPress plugin that allows you to easily control the length of your summaries without writing code. Some popular plugins include Advanced Excerpt or Yoast SEO (which also offers options to customise the excerpt according to your preferences).
With these plugins, you can simply access the settings and change the length of the excerpt with just a few clicks, adapting it perfectly to your site layout and SEO needs.
3. Manual editing in individual posts
Alternatively, you can always insert a customised summary for each post, instead of relying on the automatic summary generated by WordPress. When creating a new post, you will find anexcerpt field in the editing section of the post. Here you can enter a customised summary of the length you want, although this option is not automatic and requires you to manually enter the text for each post.
Conclusions
Changing the number of words in the WordPress theme summary is not just a matter of aesthetics, but a key element in improving the usability, customisation and SEO of your site.
If you want to get the most out of your WordPress site, customising the length of the summary is an important step to offer a better browsing experience and to optimise your content's visibility in search engines.
Whether you choose to do it through code, a plugin or manually, the important thing is to align the length of the summary to the specific needs of your site and your audience.