开发者

Wordpress feeds have rubbish social images in content - how do I remove? Either PHP string or Wordpress

开发者 https://www.devze.com 2023-04-06 15:42 出处:网络
If you look at the content feed on http://minnesotatransplan开发者_StackOverflow社区t.wordpress.com/feed/ for example - you\'ll see a pile of quite poor share and social images at the bottom of each i

If you look at the content feed on http://minnesotatransplan开发者_StackOverflow社区t.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.

Does anyone know how to get rid of these or programmatically remove with 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消