Cambios en child theme (tema hijo)
-
Buenas tardes:
He creado un child theme y en su fichero functions.php he creado una área de Widgets para poner el comando «search» que tengo en el listado de los widget. Pongo el widget arrastrándolo a esta nueva área. El código incluido es el siguiente:
function create_above_header_right() { register_sidebar( array( 'name' => __( 'Above Header Right','music' ), 'id' => 'above-header-right', 'description' => __( 'Shows on right side in header.','music' ), 'before_widget' => '<div id="%1$s" class="widget searchbar %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'create_above_header_right', 99 ); ?>El fichero header.php (que lo tengo en el parent theme, pero no en el child theme) llama a este registro que he creado a través del siguiente código:
/* call Above Header Right widget area */ if ( is_active_sidebar( 'above-header-right' ) ) : dynamic_sidebar( 'above-header-right' ); endif;Cuando cambio al parent theme, esté área no aparece y, si regreso nuevamente al child theme, aunque está el área que he creado anteriormente, ya no aparece el comando search que había arrastrado.
He probado a copiar el fichero header.php en el child theme, pero sin resultado.¿Cómo puedo hacer para que no pierda lo que he hecho en el child theme cuando cambio del parent al child, nuevamente?
Gracias
El debate ‘Cambios en child theme (tema hijo)’ está cerrado a nuevas respuestas.