New answers tagged content
Yep, wp_trim_words(): <?php $trimmed = wp_trim_words( $text, $num_words = 55, $more = null ); ?> Or in your case: <?php echo apply_filters( 'the_content', wp_trim_words( strip_tags( $post->post_content ), 55 ) ); ?>
The function that parses the shortcode, do_shortcode is added as a filter on the_content by default, at priority 11. You can remove it using remove_filter: remove_filter( 'the_content', 'do_shortcode', 11 ); Call this right before you're actually using the_content, and add it afterwards (in the unlikely case that it's needed after that): remove_filter( ...
That option refers to show excerpt on rss/atom feeds, not to normal frontend archives. You can get that value using get_option( 'rss_use_excerpt' ); That is 1 if user choose "Summary", 0 if user choose "Full text".
Top 50 recent answers are included