Hello Themeco,
is there any way I can determine if a page has been build with Gutenberg or with Cornerstone in my custom template files code?
Thank you!
René
Hello Themeco,
is there any way I can determine if a page has been build with Gutenberg or with Cornerstone in my custom template files code?
Thank you!
René
After some more research I found a function that checks if Gutenberg has been used for the current post. A bit of a hack since has_block() is not intended for this kind of use:
function is_gutenberg() {
global $post;
if ( function_exists( 'has_blocks' ) && has_blocks( $post->ID ) )
{
return true;
} else {
return false;
}
}
So far this working for me. But maybe there is something like is_cornerstone() ?
Hi @raye
Regretfully, currently, there is no such function to determine the Cornerstone content inside the page.
Thanks
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.