Skip Navigation

[Resolved] Layouts in Genesis without Genesis Integration plugin

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by eSaner 7 years, 11 months ago.

Author
Posts
#401723

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

#401754

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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.