-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
52 lines (41 loc) · 1.17 KB
/
header.php
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
<?php
/**
* Page header template
*
* This is the template that displays all of the <head>
* section and everything up until <div id="content">
*
* @package BS_Theme
* @subpackage Templates
* @category Headers
* @since 1.0.0
*/
namespace BS_Theme;
// Alias namespaces.
use BS_Theme\Classes\Front as Front;
// Conditional canonical link.
if ( is_home() && ! is_front_page() ) {
$canonical = get_permalink( get_option( 'page_for_posts' ) );
} elseif ( is_archive() ) {
$canonical = get_permalink( get_option( 'page_for_posts' ) );
} else {
$canonical = get_permalink();
}
?>
<!doctype html>
<?php
// Hook for ACF forms & similar.
do_action( 'before_html' ); ?>
<html xmlns:og="http://opengraphprotocol.org/schema/" <?php language_attributes(); ?> class="no-js">
<?php Front\tags()->head(); ?>
<body <?php body_class(); ?>>
<?php
Front\tags()->body_open();
Front\tags()->before_page();
?>
<div id="page" class="site" itemscope="itemscope" itemtype="<?php esc_attr( Front\tags()->site_schema() ); ?>">
<div class="site-header-wrap">
<?php Front\tags()->before_header(); ?>
<?php Front\tags()->header(); ?>
<?php Front\tags()->after_header(); ?>
</div>