Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save wpsmith/1838097 to your computer and use it in GitHub Desktop.
Save wpsmith/1838097 to your computer and use it in GitHub Desktop.
If there's no content, don't display [Continue...]
if ( ! empty( $instance['show_content'] ) ) {
if ( 'excerpt' == $instance['show_content'] )
the_excerpt();
elseif ( 'content-limit' == $instance['show_content'] && strip_shortcodes( get_the_content() ) != '' )
the_content_limit( (int) $instance['content_limit'], esc_html( $instance['more_text'] ) );
else
the_content( esc_html( $instance['more_text'] ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment