-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
25 lines (24 loc) · 864 Bytes
/
header.php
File metadata and controls
25 lines (24 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html lang="en-US">
<head>
<?php wp_head(); ?>
<?php $post_type = ( $post ) ? get_post_type( $post->ID ) : null;
if( $post_type && ( $stylesheet_id = get_post_meta( $post->ID, $post_type . '_stylesheet', true ) ) !== false
&& ( $stylesheet_url = wp_get_attachment_url( $stylesheet_id ) ) !== false ) : ?>
<link rel='stylesheet' href="<?php echo $stylesheet_url; ?>" type='text/css' media='all' />
<?php endif; ?>
</head>
<body>
<header class="site-header">
<?php
if ( ( is_home() || is_front_page() ) &&
( get_theme_mod_or_default( 'header_copy' ) || get_theme_mod_or_default( 'header_button_copy' ) ) ) :
$header = get_custom_header_extended();
echo get_header_media($header);
?>
<?php
else:
echo '<div class="sub-page-nav">' . get_header_menu() . '</div>';
endif;
?>
</header>