Last active
June 14, 2016 17:41
-
-
Save melissajclark/2224a4678e5b45768e5f7445274fb46a to your computer and use it in GitHub Desktop.
Example - different header for pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Reference: https://codex.wordpress.org/Conditional_Tags | |
// Use conditional PHP tags to ouput different content based on the template in use?> | |
<?php if ( is_page ) ) : // check if we are on a page ?> | |
<?php // code here for display on pages ?> | |
<?php else : // code below runs if we are NOT on a page ?> | |
<?php // code here displays on anything that is NOT a page ?> | |
<?php // put any HTML / php here that you want to show on non-pages ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment