%PDF- %PDF-
| Direktori : /home/qgbqkvz/www/wp-content/themes/hello-elementor/ |
| Current File : /home/qgbqkvz/www/wp-content/themes/hello-elementor/header.php |
<?php
/**
* The template for displaying the header
*
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
*
* @package HelloElementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php $viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' ); ?>
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
hello_elementor_body_open();
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' );
}
}
if ( is_singular( 'producteur' ) || is_tax( 'categorieproducteur' ) || is_tax( 'categorie' ) || is_search() || is_404() ) {
$category_producer = get_queried_object();
$category_producer_name = $category_producer->name;
$img = get_field('category_thumbnail', $category_producer);
if(isset($img['url'])) {
$img_background = $img['url'];
}
if ( is_search() ) {
$img_background = get_template_directory_uri().'/assets/images/search-header.png';
} else if (is_singular( 'producteur' )) {
$img_background = '/wp-content/uploads/2021/11/Les-producteurs.png';
} else {
$img_background = '/wp-content/uploads/2021/11/Les-producteurs.png';
}
?>
<section class="header-category-producer position-relative" style="background-image: url(<?php echo $img_background; ?>)">
<div>
<div data-id="33e3a57" data-element_type="column">
<div>
<div data-id="aec217c" data-element_type="widget" data-widget_type="shortcode.default">
<?php echo do_shortcode( "[hfe_template id='1039']"); ?>
</div>
</div>
</div>
</div>
<div class="title-container ">
<div class="container">
<h1 class="<?php echo get_post_type(); ?>-h1">
<?php
if ( is_search() ) {
echo __( 'Résultats : ', 'marche-des-saisons' ) . get_search_query();
} else if ( is_404() ) {
echo __( 'Page Introuvable' );
} else if (is_singular( 'producteur' )) {
echo get_the_title();
} else {
echo $category_producer_name;
}
?>
</h1>
</div>
</div>
<div class="header-border-bottom-container position-absolute">
<img src="/wp-content/uploads/2021/12/Vector-2.png" class="header-border-bottom" />
</div>
</section>
<?php } //endif is page category producer ?>