I want to allow html tag when use the wp_trim_words

Viewed 6943

I want to show some content of post in anchor tag and show as link but I have use wp_trim_words function I don't know how to allow the html tags.

$more = ' <a href="'. get_permalink( get_the_ID() ) . '" class="readMoreBtn">Read More</a>';
$content = wp_trim_words( get_the_content(), 50, $more );
echo   do_shortcode($content);
2 Answers
Related