WordPress Guides

How To Change The Length Of Excerpt In WordPress

How To Change The Length Of Excerpt In WordPress

The length of the excerpt in WordPress plays a crucial role in enticing readers to click and explore your content. Crafting compelling snippets that provide a glimpse into your article helps improve user experience and boosts your website's click-through rates. In this guide, we will walk you through the process of changing the length of the excerpt in WordPress, allowing you to create engaging previews that leave readers eager for more.

Changing the excerpt length in WordPress is a relatively simple task that can be achieved using either a plugin or a few lines of code. Let's explore both options:

Option 1: Using a Plugin

1. Install and activate a WordPress plugin called "Excerpt Length Control."

2. Once activated, navigate to Settings ยป Excerpt Length Control.

3. Adjust the maximum length of the excerpt by specifying the desired number of words or characters.

4. Save your changes and test the new excerpt length by creating or updating a post.

Option 2: Customizing Code

1. Access your WordPress theme files via an FTP client or the File Manager in your hosting control panel.

2. Locate the functions.php file under your active theme's directory.

3. Open the functions.php file and add the following code at the end:


function custom_excerpt_length($length) {

return 20; // Adjust the number to your desired length


add_filter('excerpt_length', 'custom_excerpt_length');


4. Save the changes and refresh your website's front-end to see the modified excerpt length in action.

How To Change The Length Of Excerpt In WordPress Example:

Let's say you run a fashion blog, and you want to entice readers to click on your posts by providing an intriguing preview. By increasing the excerpt length to 50 words or characters, you can include more enticing details about the latest fashion trends, celebrity styles, or styling tips. This not only captures readers' attention but also prompts them to explore your content further.

Congratulations! You now have the knowledge to effortlessly change the length of the excerpt in WordPress. By taking advantage of this simple modification, you can create captivating snippets that entice readers and improve the overall user experience on your website. Don't forget to explore other guides on DamnWoo for more expert tips on elevating your online presence. And if you're ready to supercharge your success, why not try one of our awesome WordPress plugins designed exclusively for small businesses and entrepreneurs?


About Paul Waring

Paul Waring is a seasoned veteran in the WordPress ecosystem, bringing over 15 years of insightful experience as a Senior WordPress Developer. An aficionado of digital landscapes, Paul's deep-rooted passion for technology has led him to master the art of crafting functional, responsive, and aesthetically pleasing websites. As an early adopter of WordPress, Paul has witnessed and contributed to its exponential growth, helping businesses of various sizes worldwide leverage its vast array of features. His work ranges from developing intricate e-commerce solutions to optimizing site performance and enhancing UX/UI design. His forte lies in integrating progressive solutions that dovetail seamlessly with WordPress, which he is excited to share with the DamnWoo community. Away from the digital world, Paul relishes the physical and mental challenge of rock climbing - a hobby that mirrors his approach to problem-solving in web development. He finds both activities require an optimal blend of strategy, creativity, and determination to surmount seemingly insurmountable problems. Just as he scales rocky edifices, he enjoys tackling complex coding challenges and finding efficient solutions. Paul brings to DamnWoo his rich expertise, diverse experience, and his contagious enthusiasm for WordPress. He aims to demystify the often intricate world of WordPress, making it more accessible and usable for all - whether you're a seasoned developer, a tech-savvy business owner, or a curious beginner in the digital realm.

Related Posts