[英]Wordpress feeds have rubbish social images in content - how do I remove? Either PHP string or Wordpress
If you look at the content feed on http://minnesotatransplant.wordpress.com/feed/ for example - you'll see a pile of quite poor share and social images at the bottom of each item's content:encoded. 例如,如果您查看http://minnesotatransplant.wordpress.com/feed/上的内容供稿-每个项目内容的底部都会看到一堆相当糟糕的份额和社交图像:已编码。
Does anyone know how to get rid of these or programmatically remove with PHP? 有谁知道如何摆脱这些或以编程方式用PHP删除?
For anyone who's interested, I ended up doing... 对于任何有兴趣的人,我最终都会做...
$whereIsNaughtyString = strpos($contentwords, "<a rel=\"nofollow\"");
$contentTrimmed = substr($contentwords, 0, $whereIsNaughtyString);
Which got rid of all the stuff. 摆脱了所有的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.