-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathheader.php
More file actions
55 lines (54 loc) · 2.15 KB
/
header.php
File metadata and controls
55 lines (54 loc) · 2.15 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
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @package Fold
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*/
$mod_bs_theme = get_theme_mod( 'bootstrap_theme', 'light' );
$extra_prop = '';
if ( 'light-only' === $mod_bs_theme || 'light' === $mod_bs_theme ) {
$extra_prop = 'light';
} elseif ( 'dark-only' === $mod_bs_theme || 'dark' === $mod_bs_theme ) {
$extra_prop = 'dark';
}
?><!DOCTYPE html>
<html <?php language_attributes(); ?> itemscope itemtype="https://schema.org/WebPage" data-bs-theme="<?php echo esc_attr( $extra_prop ); ?>">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<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(); ?>
<a class="visually-hidden-focusable rounded shadow d-flex justify-content-center p-1 m-1" href="#primary"><?php esc_html_e( 'Skip to main content', 'fold' ); ?></a>
<a id="back-to-top" href="#" class="btn back-to-top" type="button" role="button" title="<?php esc_attr_e( 'Go to top', 'fold' ); ?>">
<span class="fas fa-chevron-up"></span>
</a>
<div id="wrapper" class="shadow-lg">
<header>
<?php
get_template_part( 'template-parts/part/popup-login' );
get_template_part( 'template-parts/part/popup-search' );
if (
! is_home() &&
! is_front_page() &&
( is_404() || is_archive() || 'template-no-header.php' === get_page_template_slug() ||
(
function_exists( 'is_woocommerce' ) &&
( is_woocommerce() || is_shop() || is_cart() || is_checkout() || is_account_page() || is_product() || is_product_category() || is_product_tag() )
) )
) {
get_template_part( 'template-parts/part/nav-no-header-top' );
} else {
get_template_part( 'template-parts/part/nav-header-top' );
get_template_part( 'template-parts/part/header-carousel' );
get_template_part( 'template-parts/part/nav-header-bottom' );
}
?>
</header>
<main id="main" class="mt-3">