Last active
September 18, 2019 14:11
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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