Skip to content

Instantly share code, notes, and snippets.

@obiPlabon
Created December 28, 2016 11:18
Show Gist options
  • Save obiPlabon/05381b88541c2a686631bd778d4ad7f7 to your computer and use it in GitHub Desktop.
Save obiPlabon/05381b88541c2a686631bd778d4ad7f7 to your computer and use it in GitHub Desktop.
<!-- START header.php -->
<!DOCTYPE html>
<html>
<head>
<!-- Other head stuff lives here -->
<?php wp_head(); ?>
</head>
<body>
<?php
if ( is_page_template( 'special-page-template-name.php' ) ) :
get_template_part( 'header', 'special' );
else :
get_template_part( 'header', 'general' );
endif;
?>
<!-- END header.php -->
<!--
HEADER PARTIALS
Following partials will be in respective files
-->
<!-- START header-special.php -->
<header class="header-special">
Special header content
</header>
<!-- END header-special.php -->
<!-- START header-general.php -->
<header class="header-general">
General header content
</header>
<!-- END header-general.php -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment