简体   繁体   English

WordPress提要中的内容包含垃圾社交图片-如何删除? PHP字符串或Wordpress

[英]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.

相关问题 如何加入两个或多个Wordpress RSS提要? - How do I join two or more Wordpress RSS Feeds? 如何在每个WordPress帖子图像周围添加div并检索悬停的图像以进行社交共享? - How do I add div around each WordPress post images & retrieve hovered image for social sharing? 如何从Wordpress中的图像中删除标题属性? - How do I remove the title attribute from images in Wordpress? Wordpress - The7 模板 - 在每个页面上我都有 4 个警告并且不知道如何在菜单或 php 站点/内容中禁用它 - Wordpress - The7 Template - On every page I have 4 Warnings and do not know how to disable it in menu or php site/content 如何将rss feed转换为WordPress 3.9.2的字符串 - How to get the rss feeds into a string for WordPress 3.9.2 如何在Wordpress中设置一些页面以具有.php扩展名? - How Do I Set Some Pages In Wordpress To Have The .php Extension? 如何在Wordpress中将PHP字符串转换为子弹 - How do I turn PHP string into slug in Wordpress 获取在PHP和WordPress中没有扩展名的图像的文件类型 - Get file type for images that do not have an extension in PHP and WordPress 将2个php组中的1个添加到Wordpress上的index.php会中断页面​​,我可以选择 - Adding 1 of 2 php groups to index.php on Wordpress breaks the page, I can have either or 如何显示一个 wordpress 的页面内容? - How do I display a wordpress page content?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM