hello-theme/header.php

42 lines
1.4 KiB
PHP
Raw Normal View History

<?php
2018-12-19 14:46:42 +02:00
/**
* The template for displaying the header
2018-12-19 14:46:42 +02:00
*
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
*
* @package HelloElementor
2018-12-19 14:46:42 +02:00
*/
if ( ! defined( 'ABSPATH' ) ) {
2019-07-11 18:37:10 +03:00
exit; // Exit if accessed directly.
}
$viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' );
$enable_skip_link = apply_filters( 'hello_elementor_enable_skip_link', true );
$skip_link_url = apply_filters( 'hello_elementor_skip_link_url', '#content' );
?>
2018-03-19 13:51:18 +02:00
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
<link rel="profile" href="https://gmpg.org/xfn/11">
2018-03-19 13:51:18 +02:00
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php if ( $enable_skip_link ) { ?>
<a class="skip-link screen-reader-text" href="<?php echo esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
<?php } ?>
2019-08-04 11:34:08 +03:00
<?php
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
get_template_part( 'template-parts/dynamic-header' );
} else {
get_template_part( 'template-parts/header' );
2021-03-17 16:10:53 +02:00
}
}