Skip to content

Instantly share code, notes, and snippets.

@wpscholar
Last active September 18, 2019 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpscholar/8da60a1f2e1a89d07348491a11725597 to your computer and use it in GitHub Desktop.
Save wpscholar/8da60a1f2e1a89d07348491a11725597 to your computer and use it in GitHub Desktop.
This plugin will prevent WordPress from automatically generating an excerpt when one is not explicitly set.
<?php
/*
* Plugin Name: Disable Auto-Generated Excerpts
* Plugin URI: https://gist.github.com/wpscholar/8da60a1f2e1a89d07348491a11725597
* Description: This plugin will prevent WordPress from automatically generating an excerpt when one is not explicitly set.
* Version: 1.0
* Author: Micah Wood
* Author URI: https://wpscholar.com
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
remove_filter( 'get_the_excerpt', 'wp_trim_excerpt' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment