- This topic has 1 reply, 2 voices, and was last updated 5 years, 10 months ago by Skandha.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
June 13, 2018 at 6:10 pm #147661audrajwolfeParticipant
Thank you for a beautiful theme! I would like to remove the ellipses that appear after excerpts in the High Responsive theme. I’ve already created a child theme so that I can create custom excerpts for all content, so I’d like the excerpts to just end with a period. I tried some basic Google searches, but none of the suggested code seems to fix the problem. Is there a small tweak to the functions.php?
The site is audrajwolfe.com. As an example, see the … in the text on the featured slider. I want to remove that.
Thanks!
June 14, 2018 at 12:57 am #147675SkandhaParticipant@audrajwolfe: Go to => Child Theme Folder => functions.php and add the following Code.
if ( ! function_exists( 'highresponsive_excerpt_more' ) ) : /** * Replaces "[...]" (appended to automatically generated excerpts) with ... and a option from customizer. * @return string option from customizer prepended with an ellipsis. */ function highresponsive_excerpt_more( $more ) { if ( is_admin() ) { return $more; } $more_tag_text = get_theme_mod( 'highresponsive_excerpt_more_text', esc_html__( 'Continue reading >', 'high-responsive' ) ); $link = sprintf( '<a href="%1$s" class="more-link"><span class="more-button">%2$s</span></a>', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ wp_kses_data( $more_tag_text ) . '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' ); return '.' . $link; } endif; add_filter( 'excerpt_more', 'highresponsive_excerpt_more' ); if ( ! function_exists( 'highresponsive_custom_excerpt' ) ) : /** * Adds Continue reading link to more tag excerpts. * * function tied to the get_the_excerpt filter hook. * * @since High Responsive 1.0 */ function highresponsive_custom_excerpt( $output ) { if ( has_excerpt() && ! is_attachment() ) { $more_tag_text = get_theme_mod( 'highresponsive_excerpt_more_text', esc_html__( 'Continue reading >', 'high-responsive' ) ); $link = sprintf( '<a href="%1$s" class="more-link"><span class="more-button">%2$s</span></a>', esc_url( get_permalink( get_the_ID() ) ), /* translators: %s: Name of current post */ wp_kses_data( $more_tag_text ) . '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' ); $output .= '.' . $link; } return $output; } endif; // highresponsive_custom_excerpt. add_filter( 'get_the_excerpt', 'highresponsive_custom_excerpt' );
Let me know if this works out.
Kind Regards,
Skandha -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- The topic ‘Remove ellipses from custom excerpts?’ is closed to new replies.