Cornerstone Code Blocks

Hey All,

I’m moving my site to Cornerstone and I needed a way to display pieces of code on a Post. I created a plugin for this and it’s available to anyone. Hope it helps as a way to do the same, or serves as an example project to create a custom element for Cornerstone.

Have a great weekend.

1.0.0 Plugin Download Link

Github

8 Likes

That’s so cool Charlie and thanks for sharing it here :clap:t2:

1 Like

Awesome! Thanks for sharing @Charlie!

1 Like

Hello !

This is very nice ! Thank you a lot.

Is there any chance that you add support for the “shortcodes” [] to be displayed ?
I would like to display a webpage where there are some shortcodes already set up for my client to copy/past but it seems that the shortcode can’t be displayed as raw text. (or i am dumb).

thank you very much

1 Like

Glad you like it.

In WordPress escaping a shortcode can be done through an extra [ like [[cs_component id="..."]]. That didn’t actually work for me, but it might for you. I think Cornerstone tries to render shortcodes too many times, or I had a plugin affecting my site in this regard. I can add in a “Escape Shortcode” toggle when I have some free time. Have a great day.

Hi charlie,

Sorry for the late answer, i did not see your reply.
Thank you. It indeed worked on the main wordpress thing, but not with cornerstone, as you said.

Thank you anyway for your help. I know it takes time to answer so i am really thankful for this.

Best

1 Like

I added an “Escape Shortcodes” toggle in the 1.0.1 release. Have a great day.