What I'm using-
WAMP, clean install of WordPress 4.3.1(No plugins) and starter theme - Underscore.
What I'm trying to achieve-
I want to have blog post, that shows only the excerpt, so I've modified content.php and change
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'cthulhu' ), array( 'span' => array( 'class' => array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
?>
to
<?php the_excerpt(); ?>
Now, I'm able to see my custom excerpt, but wordpress doesn't limit the lenght of excerpt - > I've puted 100 words to Excerpt and there's seems to be no limit in content (which should be 55 words by default).
I've also tried to add function to functions.php
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
it doesn't work.
I've also tried different themes - all version of Twenty- and it's still same.
Maybe I'm just to tired, but I'm struggling with this so hard...