Get a particular header, footer, or sidebar of wordpress
January 4, 2009
Since WordPress 2.7, it is easier to choose which header, footer or sidebar file you want to include on your theme. The following code will check if the reader is on the “WordPress” category. If yes, header-wordpress.php will be inclued, otherwise the default header will be used: <?php if is_category('WordPress') { get_header('wordpress'); } else { get_header(); } ?> You can also use that new functionality with footers and sidebars: <?php get_footer('myfooter'); ?> will include footer-myfooter.php <?php... [Read the full story]
Page 1 of 11




















