我想在锚标签中显示帖子的一些内容并显示为链接但我使用的wp_trim_words功能我不知道如何允许html标签.
$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);
Run Code Online (Sandbox Code Playgroud)