Add JSON-LD Schema to cornerstone?

Wondering what the best way to add JSON-LD schema to cornerstone is? I tried the raw content block, but it adds spacing in the content and don’t want that additional on-page space.

Hi Jon Eric,

It should be added on the head tag not using a raw content element. Try adding the following code on your child theme’s functions.php file.

function my_custom_json_ld() {
  ?>
    ...JSON LD code here...
  <?php
}

add_action( 'wp_head', 'my_custom_json_ld', 99999 );

If you don’t have a child theme yet, please see this guide.

Hope this helps.

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