Global blocks on Cornerstone

Hi!

We are looooving the theme.

We are trying to do something that is a very common ‘practice’.
Using a resuable block of content. In this case, a “pre-footer” that is, a block of content that we want to add before the footer on every page. And, we need this to be editable by the client. In a few words, a page content that is edtable on cornerstone, that will be refleceted on every page.

We added a simple page, created some content, and then included the page content on the footer.php with a “get_post and post_content” …

  1. And it worked, but not at all, because the shortcodes were not working, but being printed as normal text.
  2. We then used do_shortcode, but the same.
  3. Finally we decided to go with “Global Blocks for Cornerstone” plugin, but we are getting the same output: shortcodes not working, but being printed like text.

Can you help us find out why this is not working ?

Hi There,

Thanks for writing in!

The global block element is a third party plugin. We are not sure why it doesn’t render the CS shortcode.
We would like to encourage you to contact the plugin developer regarding this issue.

Thanks for understanding!

Hi!

We have uninstalled the plugin, and added the following custom code on footer.php :

$pre_footer =get_post(1848); 
echo do_shortcode($pre_footer->post_content); 

Where “1848” is the id of the page content we want to show before the footer.
Problems we are faceing:

  • The columns are broken, should be 1/3 each.
  • There is a text error, that begins like so : "{{base64content “PGRpdiAgY2xhc3M9IngtdGV4dCBjcy10YS1jZW50ZXIgY2VudGVyLWJsb2NrIHNs”
  • There is a background image, wich is not set on the page id 1848…

So, everything looks like there is something not working obvviously.
But this has been done with custom plain wordpress functions.

Can you give us some help here ?

I’m going to update the Secure notes witht the url of the pages.

Hi There,

First thing first, please update your Cornerstone to the latest version (3.0.4) because you already have the latest version of X.

Then remove all your customization/plugins with regards to global blocks (to avoid incompatibility), and just use the (new) native Global Blocks element of X and Cornerstone

Tips to make your pre-footer section as a Global Block, save the pre-footer section as a content template, then create a new Global Block (X > Global Block) and load your pre-footer template. Then add your pre-footer block to your page using the Global Block Element.

Hope that helps,
Cheers!

This is awesome!!
How a great way starting the day!

Thank you so much for the great support.

:slight_smile:

You’re most welcome. :slight_smile:

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