Skip Navigation

[Resuelto] Layouts in Genesis without Genesis Integration plugin

This support ticket is created hace 8 años. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por eSaner hace 8 años.

Autor
Mensajes
#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.

Este ticket ya está cerrado. Si eres cliente de Toolset y necesitas ayuda relacionada, abre un nuevo ticket de soporte.