excerpt – Is there a way to display the ‘Read more’ link if it’s within a range?
Question
I’d like to only display the first 20 words from an excerpt with a ‘Read more’ link. The code below works returns the ‘Read more’ link only if the excerpt has more than 20 words.
wp_trim_words( $excerpt, 20, $more ) )
Is there a way to display the ‘Read more’ link using a native function if it’s within a range. For example, 0 to 20. This would display the ‘Read more’ link for the first 0 to 20 words.
What other ways can this be achieved?
0
2 weeks
2023-01-25T14:03:35-05:00
2023-01-25T14:03:35-05:00 0 Answers
0 views
0
Leave an answer