portage/header.php

123 lines
3.0 KiB
PHP
Raw Permalink Normal View History

2021-08-01 17:32:46 +00:00
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="container">
*
2021-08-01 17:56:00 +00:00
* @package Portage
2021-08-01 17:32:46 +00:00
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!-- Commented out on 2021.06.27 -->
2021-08-01 17:56:00 +00:00
<?php // portage_custom_css_head(); ?>
2021-08-01 17:32:46 +00:00
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
2021-08-01 17:56:00 +00:00
<?php do_action( 'portage_before_header' ); ?>
2021-08-01 17:32:46 +00:00
<header>
<nav id="top-menu">
<?php wp_nav_menu( array(
'theme_location' => 'top-menu',
'fallback_cb' => '',
'menu_class' => 'sf-menu',
'menu_id' => 'aboveheadermenu-ul',
'container' => 'div',
'container_id' => 'aboveheadermenu',
'depth' => 1
) );
?>
<div class="clear"></div>
</nav>
2021-08-01 17:56:00 +00:00
<?php do_action( 'portage_after_top_menu' ); ?>
2021-08-01 17:32:46 +00:00
<div id="header" style="background-image: url('<?php header_image(); ?>');">
<div id="site-title">
<?php if ( is_front_page() ){
echo '<h1>' . get_option( 'blogname' ) . '</h1>';
} else { ?>
<h2><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a></h2>
<?php
}
?>
</div><!-- end #site-title -->
<div id="site-desc">
<?php
if ( is_front_page() ){
echo '<h2>' . get_option( 'blogdescription' ) . '</h2>';
} else {
echo '<h3>' . get_option( 'blogdescription' ) . '</h3>';
}
?>
<div class="clear"></div>
</div><!-- end #site-desc -->
2021-08-01 17:56:00 +00:00
<?php do_action( 'portage_before_social_media'); ?>
2021-08-01 17:32:46 +00:00
<div id="social-media-menu" class="social-navigation">
2021-08-01 17:56:00 +00:00
<?php portage_social_media_display(); ?>
2021-08-01 17:32:46 +00:00
<div class="clear"></div>
</div><!-- end #social-media-menu -->
</div><!-- end #header -->
<div class="clear"></div>
2021-08-01 17:56:00 +00:00
<?php do_action( 'portage_before_primary_menu' ); ?>
2021-08-01 17:32:46 +00:00
<!-- Commented out on 2021.06.27 -->
2021-08-01 17:56:00 +00:00
<?php // $walker = new portage_Menu_With_Description; ?>
2021-08-01 17:32:46 +00:00
<nav id="primary-menu">
<?php
2021-08-01 17:56:00 +00:00
if ( get_theme_mod( 'portage_main_menu_desc' ) == 1 ) {
2021-08-01 17:32:46 +00:00
$array = array(
'theme_location' => 'primary-menu',
'fallback_cb' => '',
'menu_class' => 'sf-menu',
'menu_id' => 'belowheadermenu-ul',
'container' => 'div',
'container_id' => 'belowheadermenu',
'depth' => 3,
// 'walker' => $walker,
);
} else {
$array = array(
'theme_location' => 'primary-menu',
'fallback_cb' => '',
'menu_class' => 'sf-menu',
'menu_id' => 'belowheadermenu-ul',
'container' => 'div',
'container_id' => 'belowheadermenu',
'depth' => 3,
);
}
wp_nav_menu( $array );
?>
<div class="clear"></div>
</nav>
<div class="clear"></div>
</header>
2021-08-01 17:56:00 +00:00
<?php do_action( 'portage_after_header' ); ?>
2021-08-01 17:32:46 +00:00
<div id="container"><!-- closing tag is in footer.php -->
2021-08-01 17:56:00 +00:00
<?php do_action( 'portage_container_top' ); ?>