programmare temi wordpress
File header.php
Il file header contiene tutti quei tag iniziali fino al <body>
1 2 3 4 5 6 7 |
<!DOCTYPE html> <html lang="it" dir="ltr"> <head> <meta charset="utf-8"> <?php wp_head(); ?> </head> <body <?php body_class( ); ?> > |
File footer.php
Il file footer contiene tutti quei tag finali da </body> fino a </html>
1 2 3 4 |
<?php wp_footer(); ?> </body> </html> |
Per richiamare una pagina header o footer alternativa, ad esempio header-alternativo.php o footer-alternativo, basta aggiungere al file index la chamata get_header ( ‘alternativo’ ); o get_footer( ‘alternativo’ ); e wordpress cercherà un file header o footer che dopo il trattino abbia scritto alternativo.