New X sections and Rss

The new cornerstone and X are great but I just noticed that anything that uses an RSS feed shows the code.
For example, instead of my post text the RSS starts off with stuff like [cs_element_section_id=“1”] etc…

Any known issues with this?

Hi,

Kindly refer to the link below.

https://theme.co/apex/forum/t/rss-feed-pulling-shortcodes/7908/7

Thanks

Let us know if you need further assistance.

that link did show me how to remove the sections but then it removes any text that is grabbed by whatever is using the RSS.
so it does do what I am looking for…
would be great to incorporate an RSS customizer, similar to the plugin “featured images in rss feeds”

Have you managed to solve this problem? I am experiencing the same problem, the solution above essentially strips out all the text and other applications i have connected to the feed are just showing blank articles.

Hi there,

Ah, it’s because those texts are wrapped by shortcodes, please try this one

add_filter('the_excerpt_rss', 'x_custom_feed');
add_filter( 'the_content_feed', 'x_custom_feed' );
function x_custom_feed( $content ){
	global $post;

	if ( ! is_feed() )
		return $content;

	// Remove all shortcodes
	$content = apply_filters('the_content', $post->post_content);

	return $content;
}

Thanks!

That does remove any shortcodes…

Is ‘the_content’ right?

This doesn’t seem to be stripping the shortcode, please see our feed here
http://www.hatfield.co.za/blog/feed/

Hey @clefler and @hatfieldchurch,

Even if you successfully strip the shortcodes, no content will be shown in your RSS feed because Cornerstone or the Content Builder now stores data in the post meta and not in the content. With that said, you might want to disable RSS feed by following this guide.

If RSS is important to your site, please use the default WordPress editors only for your posts.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.