网站建设 wordpress显示摘要并且保留html标签的代码 2012年6月9日 root 873条评论 在function.php中添加以下代码: add_filter('the_content', 'wpi_image_content_filter', 11); function wpi_image_content_filter($content){ if (is_home() || is_front_page()){ $content = preg_replace("/<img[^>]+\>/i", "", $content); } return $content; }