[英]Wordpress RSS Feed display raw shortcode (do not render)
I'm using the default RSS feed to pass some content through to some subsites I manage. 我使用默认的RSS提要将一些内容传递到我管理的某些子站点。 But there are some shortcodes which are being rendered, but should be rendered by the subsites. 但是有一些短代码正在呈现,但是应该由子站点呈现。
So how do I prevent the shortcodes from being parsed? 那么,如何防止简码被解析?
The shortcode it's about is from a plugin. 它的简短代码来自插件。
[wb-rekentool "username/othername"]
I solved the problem! 我解决了问题! Used the "the_content_feed" filter to remove the shortcode: 使用“ the_content_feed”过滤器删除短代码:
function remove_sc_feed($content){
remove_shortcode('wb-rekentool');
return $content;
}
add_filter('the_content_feed', 'remove_sc_feed');
Easy, but the answer was nowhere to be found! 容易,但是答案无处可寻!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.