Creazione di un child theme per Wordpress
Un child theme ha uno style.css proprio, mentre eredita tutti gli altri files dal tema padre. Se si modificano questi files, si modificano i files del tema padre.
Copia del child theme
- How I used a WordPress Child Theme To Redesign My Blog
- BuddyPress.org → Docs → Theme Dev: Building a BuddyPress Child Theme
- Subtheming quickstart | Fusion Drupal Themes Shop
Personalizzazione dei files .php
- Se si deve customizzare un file .php tipo header.php, copiarlo nella cartella del child theme e modificarlo: verrà usato questo al posto di quelo del tema padre
- Se invece si vogliono modificare delle funzioni nel file functions.php, occorre distringuere due casi:
- La funzione è dichiarata nel tema padre in un blocco
if ( ! function_exists( 'fathertheme_function' ) ):
Si può ridefinire semplicemente la funzione nel file functions.php nella cartella del child theme
- La funzione è definita normalmente: seguire le istruzioni
Riferimenti
- BuddyPress.org → Docs → Theme Dev: Building a BuddyPress Child Theme
- How to make a child theme for WordPress: A pictorial introduction for beginners - op111.net
- Introducing Thirty Ten, my guide to creating a Twenty Ten Child Theme
- How To Modify WordPress Themes The Smart Way
- Child Themes « WordPress Codex
- How to Customize Twenty Ten Theme // The Blog House