How to show only manual / custom excerpts?

You can use has_excerpt() for this, which checks whether the post has a manually set excerpt. The sample code below uses this function: <?php if ( has_excerpt() ) : // Only show custom excerpts not autoexcerpts ?> <span class=”entry-subtitle”><?php echo get_the_excerpt(); ?></span> <?php endif; ?>

Limit the_excerpt in the first point (.) of the sentence

First, please make sure you understand the difference between the_excerpt and the_content. You are asking about the_excerpt but I suspect that you might actually mean the_content. That said… You can filter the the_excerpt function with a filter of the same name. add_filter( ‘the_excerpt’, function ($excerpt) { return substr($excerpt,0,strpos($excerpt,’.’)+1); } );

the_excerpt() or get_the_excerpt with shortcode escape

You can make WordPress execute your shortcode in the excerpt by hooking into get_the_excerpt filter and overwriting the default wp_trim_excerpt function, which is responsible of stripping the shortcode tags from the excerpt as pointed by Chip: add_filter(‘get_the_excerpt’, ‘do_my_shortcode_in_excerpt’); function do_my_shortcode_in_excerpt($excerpt) { return do_shortcode(wp_trim_words(get_the_content(), 55)); } This is applied to both the_excerpt() and get_the_excerpt() outputs. If … Read more

Excerpt Word Count

Sorry for reading wrong your question @siouxfan45! here is the right answer: just a little improvement in your code and you can count words! just change these two lines: jQuery(“#excerpt_counter”).val(jQuery(“#excerpt”).val().length); to this: jQuery(“#excerpt_counter”).val(jQuery(“#excerpt”).val().split(/\S\b[\s,\.\’-:;]*/).length – 1); Words with single quote like “don’t”, “it’s”, “I’d”, “won’t”…will count as two! If you want them to count as a … Read more

Custom excerpt length on home page

How filters work Filters are simply a point where you can take some value, that is set (for something) in core (for e.g. the the_excerpt() function), in open to modifications. So… $some_var = apply_filters( ‘change_this_var’, 50 ); …just says: »Some var« is set to 50, but when you add a filter callback to change_this_var, then … Read more

Read more tag shows up on EVERY post

I actually never got to add this section to my answer you are referring to. To remove the read more link from the excerpt is quite easy, you just need to compare $count with $excerpt_length. $count will always be between 0 and the value assigned to $excerpt_length. So what we want to do here is … Read more

Remove Ellipses from Excerpt

You haven’t added the second filter, at least not in the code posted. If used, that filter will not print ellipses. // Changing excerpt more function new_excerpt_more($more) { global $post; remove_filter(‘excerpt_more’, ‘new_excerpt_more’); return ‘ <a class=”read_more” href=”‘. get_permalink($post->ID) . ‘”>’ . ‘read more’ . ‘</a>’; } add_filter(‘excerpt_more’,’new_excerpt_more’); Notice the couple of changes I made to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)