Firing schema via code in functions.php doesn’t work

The more cleaner way of adding the custom data to your site’s <head> is to use a custom function, which you hook to a relevant action. In this case you could for example utilize the wp_head action. Like so, // this goes to functions.php file add_action(‘wp_head’, ‘insert_my_page_schema’); function insert_my_page_schema() { // only execute the code … Read more