Skip to content

Instantly share code, notes, and snippets.

@mrwweb
Created September 22, 2014 18:34
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 mrwweb/bebf4cbdcf50d4eadd46 to your computer and use it in GitHub Desktop.
Save mrwweb/bebf4cbdcf50d4eadd46 to your computer and use it in GitHub Desktop.
Example of fpw_auto_excerpt filter in Feature a Page Widget 2.0. By default, the widget only shows the excerpt for posts with an explicitly-set excerpt (i.e. has_excerpt() is TRUE).
<?php
/**
* Set fpw_auto_excerpt to TRUE to allow auto-generated excerpts if the Excerpt field is blank
*
* Uses the_excerpt() and associated filters.
*/
add_filter( 'fpw_auto_excerpt', '__return_true' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment