Easily Disable the WordPress Auto Excerpt

If you are a WordPress user, you may have encountered situations where WordPress automatically generates an excerpt for your posts. While this can be useful in certain scenarios, there are times when you may want more control over how content is presented. If you want to disable the WordPress auto-excerpt feature, you’re in the right place.


Why Disable the WordPress Auto Excerpt?

By default, WordPress uses the “auto-excerpt” feature to generate a summary of your content. However, in some cases, it doesn’t capture the essence of your content accurately, or it cuts off your post in a way that you don’t desire. Whether you want to manually control how your content is summarized or if you prefer a specific length, disabling the auto-excerpt feature can give you more freedom.


Methods to Disable the WordPress Auto Excerpt Feature

Method 1: Using functions.php File

You can disable the auto-excerpt feature by adding a code snippet in your functions.php file.

  1. Access Your Theme’s functions.php file:
    • Log in to your WordPress site.
    • Navigate to Appearance > Editor.
    • Select your theme from the list, and locate functions.php.
  2. Add the following code:
    function disable_auto_excerpt($output) {
        return '';
    }
    add_filter('get_the_excerpt', 'disable_auto_excerpt', 20);
    
  3. Save Changes:
    After adding the code, update and save the functions.php file.

This code removes the auto-generated excerpt from your posts.


Method 2: Using a Code Snippet in functions.php (Simplified)

Alternatively, you can simplify the above method if you only want to disable auto-excerpts without modifying too much code.

  1. Add this code directly:
    remove_filter('the_excerpt', 'wp_trim_excerpt');
    

    This will disable the auto-excerpt generation.


Method 3: Disable Auto Excerpt in Gutenberg Editor (WordPress 5.0 and above)

If you are using the Gutenberg editor, you can disable the auto-excerpt directly from the editor.

  1. Open the Gutenberg Editor for the post.
  2. Click on the “Document” tab on the right-hand side.
  3. Scroll down to “Excerpt”.
  4. Uncheck “Automatically generate the excerpt”.

This will disable the auto-excerpt for that post.


Benefits of Disabling Auto Excerpts

  • Full control over content display: You can decide exactly how much content is shown.
  • Improved readability: Avoid abrupt cuts in content.
  • Consistency: You ensure uniformity across all content.

Conclusion

Disabling the WordPress auto-excerpt feature can help you create more engaging and controlled content for your website. Whether you prefer manual control or simply don’t like how WordPress generates summaries, using one of the methods above can help you easily disable this feature.

By adding a small code snippet to your functions.php file or adjusting settings in the Gutenberg editor, you can regain control over how your content is presented.


For more helpful WordPress tutorials, visit Web Tutorials Hub.

January 14, 2025