the_excerpt() is not trimming at

the_excerpt() does not recognise or support the <!– more –> tag. From the documentation: The <!–more–> quicktag requires templates to use the_content() whereas using excerpts requires, and allows, template writers to explicitly choose whether to display full posts (using the_content()) or excerpts (using the_excerpt()). The point is that the_excerpt() allows theme authors (you) to require … Read more

How to automatically add Read more section after the first paragraphe in post?

Use the excerpt with a custom read more link in functions.php add_filter( ‘excerpt_length’, ‘modify_excerpt_length’ ); function modify_excerpt_length( $length ) { return 15; } add_filter( ‘excerpt_more’, ‘your_excerpt_more’ ); function your_excerpt_more( $more ) { $more = sprintf( ‘ <a href=”https://wordpress.stackexchange.com/questions/341980/%s” class=”read-more” rel=”bookmark”>’ . __( ‘Read More’ ) . ‘</a>’, esc_url( get_permalink() ) ); return $more; } Or, … Read more

“read more” redirects to the wrong page

function excerpt_readmore($more) { return ‘… <a href=”‘. get_permalink($post->ID) . ‘” class=”readmore”>’ . ‘Read More’ . ‘</a>’; } add_filter(‘excerpt_more’, ‘excerpt_readmore’); Please add above code into functions.php

How to enable read more by default using jquery

You can use the solution bellow with jQuery: jQuery(document).ready(function(){ jQuery(“.post-read-more”).each(function(){ jQuery(this).click(); }); // And if you want to finally disable this links jQuery(“.question-read-more”).remove(); jQuery(“.question-read-less”).remove(); }); Bests, Camille

How to change “Read More” text?

add_filter(‘gettext’, ‘translate_my_text’ ); function translate_my_text($translated) { $translated = str_ireplace(‘Leave a comment on: “%s”’, ‘my text“%s”’, $translated); $translated = str_ireplace(‘Leave a Comment’, ‘my text’, $translated); $translated = str_ireplace(‘Read More’, ‘my text’, $translated); $translated = str_ireplace(‘READ MORE’, ‘my text’, $translated); return $translated; }