-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
89 lines (74 loc) · 4.59 KB
/
header.php
File metadata and controls
89 lines (74 loc) · 4.59 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
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Expert DevOps and infrastructure automation services. We deliver automated, scalable, and secure cloud solutions for high-growth tech teams.">
<!-- FontAwesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
<!-- Always render default header unless specifically disabled -->
<header class="site-header">
<div class="container">
<div class="header-container">
<!-- Logo -->
<div class="site-branding">
<?php if (has_custom_logo()) : ?>
<div class="custom-logo-container" style="width: 150px; height: 70px;">
<?php the_custom_logo(); ?>
</div>
<?php endif; ?>
</div>
<!-- Primary Navigation -->
<nav class="main-navigation">
<?php
wp_nav_menu(array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'container' => false,
'menu_class' => 'nav-menu',
'fallback_cb' => function() {
$current_url = home_url($_SERVER['REQUEST_URI']);
echo '<ul class="nav-menu">';
// Home - only active on front page, not blog
$home_class = (is_front_page() && !is_home()) ? 'current-menu-item' : '';
echo '<li class="menu-item ' . $home_class . '"><a href="' . home_url('/') . '">Home</a></li>';
// About
$about_class = (is_page('about') || strpos($current_url, '/about') !== false) ? 'current-menu-item' : '';
echo '<li class="menu-item ' . $about_class . '"><a href="' . home_url('/about/') . '">About</a></li>';
// Services
$services_class = (is_page('services') || strpos($current_url, '/services') !== false) ? 'current-menu-item' : '';
echo '<li class="menu-item ' . $services_class . '"><a href="' . home_url('/services/') . '">Services</a></li>';
// Case Studies
$cases_class = (is_page('case-studies') || strpos($current_url, '/case-studies') !== false) ? 'current-menu-item' : '';
echo '<li class="menu-item ' . $cases_class . '"><a href="' . home_url('/case-studies/') . '">Case Studies</a></li>';
// Blog - active on blog page, blog home, category pages, and single posts
$blog_class = (is_home() || is_page('blog') || is_category() || is_single() || strpos($current_url, '/blog') !== false || strpos($current_url, '/category') !== false) ? 'current-menu-item' : '';
echo '<li class="menu-item ' . $blog_class . '"><a href="' . home_url('/blog/') . '">Blog</a></li>';
echo '</ul>';
}
));
?>
</nav>
<!-- Mobile Menu Toggle -->
<button class="mobile-menu-toggle" aria-label="Toggle mobile menu" aria-expanded="false">
<span class="hamburger">
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
</span>
</button>
<!-- Header Actions -->
<div class="header-actions">
<a href="/contact/" class="btn btn-primary">
<?php echo esc_html(get_theme_mod('modul8_cta_text', 'Get In Touch')); ?>
</a>
</div>
</div>
</div>
</header>
<main id="main" class="site-main">