我正在尝试删除\\u摘录()开头的空格;。它们是由内容中两个图像之间的空白空间组成的。在下面的代码中,我尝试使用str\\u replace来消除它们,但没有成功。
$string = get_the_excerpt();
$string = str_replace(\' \',\'\',$string);
echo $string;
使用相同的设置,可以删除正常间距
$string = get_the_excerpt();
$string = str_replace(\' \',\'\',$string);
echo $string;
为什么会出现这种情况,如何删除
?
UPDATE
这是图像在编辑器中的放置方式-是图像之间的空间导致
在摘录的开头。
这就是结果

这就是我检查元素时的样子。
