Using shortcodes in Accordion Element items

Is it possible to nest/use shortcodes inside the accordion elements items? I developed this page before and it was working. But now it is just showing the static text of the shortcodes and not implementing them.

This seems to be happening a lot in other cornerstone elements where I was able to previously use shortcodes. Is there a good alternative method? For this particular element, I wanted to get three columns of list items as we want to display our job offerings for each accordion section and there are about 8-12 for each, so lining them up in columns would display more efficiently than one long list. Here is how it looked previously when we were able to use a tabbed element for this purpose.

Any help much appreciated!

Hi There,

Let’s try for basic troubleshooting first. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Something like below without the content band shortcode should still work.

[column type="1/3"] Place your content in here column 1.[icon_list] [icon_list_item type="arrow-right"]This is...[/icon_list_item] [icon_list_item type="bullseye"]...a super rad...[/icon_list_item] [icon_list_item type="play-circle"]...icon list![/icon_list_item] [/icon_list][/column] [column type="1/3"] Place your content in here column 2.[icon_list] [icon_list_item type="arrow-right"]This is...[/icon_list_item] [icon_list_item type="bullseye"]...a super rad...[/icon_list_item] [icon_list_item type="play-circle"]...icon list![/icon_list_item] [/icon_list] [/column] [column type="1/3" last="true"] Place your content in here column 3.[icon_list] [icon_list_item type="arrow-right"]This is...[/icon_list_item] [icon_list_item type="bullseye"]...a super rad...[/icon_list_item] [icon_list_item type="play-circle"]...icon list![/icon_list_item] [/icon_list] [/column][clear]

See this: https://screencast-o-matic.com/watch/cb6XX6IEoR.

Good morning! Thanks for the response. I deactivated all but 7 plugins provided by X. It still doesn’t work on a brand new page with only the accordion element + the code you provided under the first item. Some screenshots below.

Active Plugins

Page Setup

Results

Hi there,

I just checked this in my installation and adding shortcodes in accordion content is properly working. I use the exact content as provided. Would you mind providing your network admin login credentials for testing?

Thanks!

Hi There,

Please try to prepend x_ on all your shortcodes like this:

[x_button type="flat" shape="square" size="large" href="http://clarityprod.staging.wpengine.com/insights/migrating-cloud-based-lms-everything-need-know/" title="Read More" class="x-btn-77c043"]Read More[/x_button]

See sample here: http://clarityprod.staging.wpengine.com/?page_id=13497

Hope this helps.

Thank you! This worked and fixed the issue with using the button shortcode. Is there a new document on new shortcodes vs old to implement cornerstone elements? We use quite a few raw elements as well as <?php echo do_shortcode for cornerstone elements. It would be good to update our code and ensure items do not break in the future. Thanks again for the support!

You are always welcome!

Yes, this changes was stated on the changelog since X theme version 4.0.

Hello,

So this issue seems to persist or manifest itself in different ways. We are on WPEngine (PHP v5.6) and we take advantage of WPEngine’s Stage vs Live environment. You can make all of your changes on Stage and then push them to Live using WPEngine’s integrated tool.

I have repeatedly tried to push from Stage to Live but it always breaks Wordpress. Here is the error code that repeats numerous times in the error logs;

"[Tue Oct 24 23:55:52.699757 2017] [:error] [pid 30042] [client 50.234.24.238:36404] PHP Fatal error: Cannot redeclare class Cornerstone_Shortcode_Generator in /nas/content/live/clarityprod/wp-content/plugins/cornerstone/includes/classes/classic/builder/class-shortcode-generator.php on line 2585"

I read a couple of other posts from users with similar issues and tried pushing from stage to live, then deleting the Cornerstone plugin via FTP. Then I logged in and Cornerstone was reinstalled automatically via the X - Overview menu. That actually fixed the site from blowing up, but a new problem appeared. Now I am again having cornerstone shortcodes that do not render. here is an example;

What is frustrating is that these are cornerstone components that were updated using new and not classic elements. You had mentioned to place an “x_” in shortcodes but I should never have to do that for new elements built using Cornerstone. Furthermore, it is my understanding that you cannot edit Cornerstone tags directly unless using the raw element. Something is definitely off here.

For some reason the identical content works fine in Stage. But when pushed from Stage to Live, all of these issues appear. I have restored the backup of our Live site prior to the Stage to Live push. Any help would be appreciated. Thank you.

All,

I got this fixed. I ran WPEngine’s Stage to Live sync, but this time I also deleted the xtheme theme files (all of them, including the child themes). I copied the xtheme files from stage to live via FTP after WPEngine finished the stage to live sync process. I then logged in, clicked X-overview and let X re-install Cornerstone as well. Once that was all done, all the strangeness with Cornerstone shortcodes not functioning went completely away.

I believe the WPEngine stage to live migration tool does not fully delete and then copy files. It performs some sort of merge process. If a file exists in live and not stage, it will not delete that file from live. That may have been the issue all along.

I hope this helps anyone experiencing similar issues with WPEngine or another host. Thank you.

Glad you’ve sorted it out and thank you for sharing with us.

Cheers!