这一定很简单,但当我在header中使用下面的函数时。php获取文章摘录,为单个文章或页面使用元描述
setup_postdata($post); $excerpt = get_the_excerpt(); echo $excerpt;
<meta name="description" content="There&#8217;s an interesting thing
going on in the world of digital music; it&#8217;s moving
into the &#8220;cloud.&#8221; ...">
我试过了echo htmlentities($excerpt);
和echo html_entity_decode($excerpt);
没有运气。如何防止这些实体出现?我没有在函数中使用函数。php生成摘录。这是一种变通方法,因为我有数百篇没有手动摘录的帖子,我认为手动摘录不受实体问题的影响,这就是我尝试使用标准摘录的原因。