check for example https://developer.ww.wp.xz.cn/reference/functions/the_excerpt/#comment-327
this is part of https://developer.ww.wp.xz.cn/reference/functions/the_excerpt/
to mirror the ‘Continue reading’ formatting as in the theme Twenty Twenty, the code would be:
//excerpt 'continue reading' link
function twentytwentychild_excerpt_more_add_continue_reading( $more ) {
return ' ... <div class="read-more-button-wrap"><a href="' . get_permalink( get_the_ID() ) . '" class="more-link"><span class="faux-button">Continue reading</span> <span class="screen-reader-text">“' . get_the_title( get_the_ID() ) . '”</span></a></div>';
}
add_filter('excerpt_more', 'twentytwentychild_excerpt_more_add_continue_reading' );
should ideally be added into functions.php of a child theme.
https://developer.ww.wp.xz.cn/themes/advanced-topics/child-themes/
This doesn’t work if you’ve added your own excerpt.
In fact, is there a way to make this button ONLY show if you’ve manually added an excerpt. The auto-excerpt sometimes leads to an article that only has one or two more words than the excerpt.
Thanks!
-
This reply was modified 6 years, 4 months ago by
acorngroup.
Had the exact same issue and figured out after a while!
1. goes to customize – Theme Options
2. on archive pages, posts show:
choose Full text instead of Summary
Boom!