-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
76 lines (69 loc) · 2.83 KB
/
Copy pathheader.php
File metadata and controls
76 lines (69 loc) · 2.83 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* The header for our theme
*
* @package ProfilWP
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<!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="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'profilwp' ); ?></a>
<?php $logo_bg_color = get_theme_mod( 'profilwp_logo_bg_color', '#d9ff00' ); ?>
<header id="masthead" class="site-header floating-pill">
<div class="container site-header-inner">
<div class="site-branding" style="background-color: <?php echo esc_attr( $logo_bg_color ); ?>;">
<?php
if ( has_custom_logo() ) :
the_custom_logo();
else :
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php endif; ?>
</div><!-- .site-branding -->
<nav id="site-navigation" class="main-navigation">
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false" aria-label="<?php esc_attr_e( 'Menu', 'profilwp' ); ?>">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</button>
<?php
if ( has_nav_menu( 'primary' ) ) {
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'container' => false,
)
);
} else {
// Default fallback menu for preview
$home_url = esc_url( home_url( '/' ) );
echo '<ul id="primary-menu" class="menu">';
echo '<li><a href="' . $home_url . '#hero">' . esc_html__( 'Home', 'profilwp' ) . '</a></li>';
echo '<li><a href="' . $home_url . '#about">' . esc_html__( 'About', 'profilwp' ) . '</a></li>';
echo '<li><a href="' . $home_url . '#portfolio">' . esc_html__( 'Work', 'profilwp' ) . '</a></li>';
if ( get_theme_mod( 'profilwp_enable_digital_products', false ) ) {
echo '<li><a href="' . $home_url . '#products-carousel">' . esc_html__( 'Products', 'profilwp' ) . '</a></li>';
}
echo '<li><a href="' . $home_url . '#latest-posts">' . esc_html__( 'Blog', 'profilwp' ) . '</a></li>';
echo '<li><a href="' . $home_url . '#contact">' . esc_html__( 'Contact', 'profilwp' ) . '</a></li>';
echo '</ul>';
}
?>
</nav><!-- #site-navigation -->
</div><!-- .container -->
</header><!-- #masthead -->