Temas hijos en wordpress

Para crear un tema hijo sólo tenemos que crear una carpeta y dentro un archivo style.css con lo siguiente:

/*
 Theme Name:   Twenty Seventeen Child
 Theme URI:    http://example.com/twenty-fourteen-child/
 Description:  Twenty Seventeen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyseventeen
 Version:      1.0.0
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-seventeen-child
*/
@import url("../twentyseventeen/style.css");

Otra opción, sin usar @import (más recomendado) es crear el archivo functions.php y poner la siguiente línea:


wp_enqueue_style('twentyseventeen',get_template_directory_uri().'/style.css');

o

 wp_enqueue_style('parent-style',get_template_directory_uri().'/style.css'); 

 

Ojo al apartado Template y al import del url.

Tutorial:

Temas hijos

https://ayudawp.com/como-crear-un-tema-hijo-en-wordpress/

https://www.webempresa.com/blog/crear-temas-hijo-child-themes-en-wordpress.html

https://docs.presscustomizr.com/article/24-why-and-how-to-create-a-child-theme-with-wordpress

 

Publicado por

Avatar del usuario

Juan Pablo Fuentes

Formador de programación y bases de datos