I am trying to use Layouts with a Genesis child theme, but I only want the Layouts output to replace the main content, not the header or footer. I don't want to use the Genesis Integration plugin because it takes control of some of the Genesis action hooks, like genesis_footer, so I can no longer use them.
Instead I would like to check if a Layout is assigned to a page, and then if it is, display the Layout output doing something in my functions.php file like:
add_action( 'genesis_loop', 'es_do_layout' );
function es_do_layout() {
if ( page_has_a_layout() ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
the_ddlayout();
}
}
Is there a way to get the Layouts plugin to think it's integrated with the theme without including the_ddlayout(); in a page template file? Because the Genesis template files only include the genesis(); function and no markup.
Thanks,
Eric
Nevermind! I got it to work by creating a page template that includes Genesis markup and hooks and inserting the_ddlayout(); in the page template.