Shortcode [cs_content] seems to obstruct the rendering of posts since X update

Hi guys,

I’ve got a question about the shortcode [cs_content] that seems to cause a white screen in our custom posttypes.

Here’s the deal. When we update X Theme (from 7.2.3 to 9.1.4), it appears that the custom posttypes are all empty. They’re not being rendered any more.

When we delete the shortcode [cs_content] from the posttype templates in our X-Child Theme, the content is being rendered. So… the shortcode that’s supposed to call for the content, now seems to obstruct it.

Can we delete the shortcode without any consequences? (It appears there are none on our staging.) Is the shortcode a must? Is it perhaps outdated since X 9.1.4?

Best regards, Koen

Hi Koen,

Thanks for reaching out.
It will be very difficult to recognize the reason behind your issue without investigating it through the Admin Dashboard. Although the Custom Post Type is beyond the scope of theme support, still, we would like to know the reason behind your issue. I would suggest troubleshooting the following common issue to help us to recognize the reason.

1.Theme Related Issue
2.Plugin Conflict
3.Theme Update related issue
4.Child Theme Related issue
5.CSS/JS Customization
6.Disabling Cache

If you discover that an issue is coming from a custom code or 3rd party plugin, kindly consult with a developer or contact the plugin author. Please note that we do not provide support for custom codes and 3rd party plugins.
If none of the above helps and you are still getting the issue, please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hello Koen,

By withdrawing the post, I believe you already have resolved the issue. If the issue still existed, you can let us know.

Thanks

Hi Tristup,

We’ve already done all the troubleshooting. All the updates, deactivated the plugins one by one, activated X Theme (then: nó white screens)… and that’s when we concluded that the conflict that obstruct the rendering of the custom posts must be hidden somewhere in our X-Child Theme. Probably some outdated code inherited from X that’s not valid anymore after updating from X 7.2.3 to 9.1.4. So we started looking for suspicious code. We tried deleting the shortcode [cs_content] from the templates in our Child Theme and that seemed to do the trick. But… this shortcoded is meant to call for the content, if I’m correct? So, we’re wondering: is the shortcode a must? Will it harm the installation if we delete it in all our templates?

Please have a look at our staging, detail in secure note below.

Best regards, Koen

Hello Koen,

This is what is messing up the page:

echo do_shortcode('
[cs_content]

				[x_raw_content]
					<div class="banner-container">
					    <div id="gam_static_top_alpha_mobile">
      						<script>
        						googletag.cmd.push(function() {googletag.display("gam_static_top_alpha_mobile");});
      						</script>
    					    </div>
					</div>
				[/x_raw_content]
	[cs_section parallax="false" style="margin: 0px;padding: 0px 0px 45px;"]
		[cs_row inner_container="false" marginless_columns="false" class="header-image-div" style="margin: 0px auto;padding: 0px;"]
			[cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" class="cs-ta-left" style="padding: 0px;"]
				[x_image type="none" src="'
					.wp_get_attachment_link(get_post_thumbnail_id($post->ID), 'large').
					'" alt="" link="false" href="#" title="" target="" info="none" info_place="top" info_trigger="hover" info_content="" style="width:100%;" class="detail-header-image"]
			[/cs_column]
		[/cs_row]
		[cs_row inner_container="false" marginless_columns="false" style="margin: 0px auto;padding: 0px;"]
			[cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"]
				[cs_text]
					<div class=post-header>'
						.$grid_label.
						'<h3 class="post-title">'
						.$post->post_title.
						'</h3>'
						//.$genre.
						//''
						.$event_date_display.
						''
						.$event_location.
						''
						.$event_city.
					'</div>
				[/cs_text]
			[/cs_column]
		[/cs_row]
		[cs_row inner_container="false" marginless_columns="false" style="margin: 0px auto;padding: 0px;"]
			[cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"]
				[cs_text]
					<div class="post-content">'
						.$main_content.
						''
						.$body.
					'</div>
				[/cs_text]
				[x_raw_content]
					<div class="sharebottom">
						[addtoany]
					</div>
				[/x_raw_content]
				[x_raw_content]
					<div class="banner-container">
					    <div id="gam_static_mid_alpha_desktop">
      						<script>
        						googletag.cmd.push(function() {googletag.display("gam_static_mid_alpha_desktop");});
      						</script>
    					    </div>
					    <div id="gam_static_mid_alpha_tablet">
      						<script>
							googletag.cmd.push(function() {googletag.display("gam_static_mid_alpha_tablet");});
      						</script>
    					    </div>
					    <div id="gam_static_mid_alpha_mobile">
      						<script>
        						googletag.cmd.push(function() {googletag.display("gam_static_mid_alpha_mobile");});
      						</script>
    					    </div>
					</div>
				[/x_raw_content]
				[x_raw_content]'
						.$related_news.''
						.$related_albums.
				'[/x_raw_content]
			[/cs_column]
		[/cs_row]
	[/cs_section]
	[cs_section parallax="false" style="margin: 0px;padding: 0px 0px 45px;"]
		[cs_row inner_container="false" marginless_columns="false" style="margin: 0px auto;padding: 0px;"]
			[cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"]
				[cs_text]
					<h4 style="text-transform: uppercase; text-align: left;">Meest gelezen artikelen</h4>
					[pt_view id="28c06f5161"]
				[/cs_text]
			[/cs_column]
		[/cs_row]
	[/cs_section]
	[cs_section parallax="false" class="cs-hide-xs" style="margin: 0px;padding: 0 0 40px 0;"]
		[cs_row inner_container="false" marginless_columns="false" style="margin: 0px auto;padding: 0px;"]
			[cs_column fade="false" fade_animation="in" fade_animation_offset="45px" fade_duration="750" type="1/1" style="padding: 0px;"]
				[x_raw_content style="text-align: center;"]
					[adrotate group="4"]
				[/x_raw_content]
			[/cs_column]

		[/cs_row]
	[/cs_section]
			[x_raw_content]
					<div class="banner-container">
					    <div id="gam_static_bot_alpha_tablet">
      						<script>
							googletag.cmd.push(function() {googletag.display("gam_static_bot_alpha_tablet");});
      						</script>
    					    </div>
					    <div id="gam_static_bot_alpha_mobile">
      						<script>
        						googletag.cmd.push(function() {googletag.display("gam_static_bot_alpha_mobile");});
      						</script>
    					    </div>
					</div>
				[/x_raw_content]
[/cs_content]
');

?>

You can find this in your child theme’s content-club-oor.php (framework/views/integrity/content-club-oor.php) file. I have checked your other files and it seems that you have heavily modified most of the templates for each custom post type. We also have restructured the templating system in the latest release which is why some of your modification is causing the issue. It is best that you compare and check the template files and how they have been ordered and which folder location they are in with this latest release.

Be advised that custom development is beyond the scope of our support. Maintaining and periodically checking any customizations should be carried by you or whoever made the modifications to make sure that it is still up to date and will continue to work. You may need to contact a 3rd party developer or contact the person who has heavily modified the templates or has made the modifications present in your child theme.

Best Regards.

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