HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/dreamssalon-wp-market/wp-content/themes/dreamsalon/header.php
<?php

$header_style = 'default';

// Check if it's a page and has a header style set
if (is_page()) {
    $page_header_style = get_post_meta(get_the_ID(), '_header_style', true);
    if (!empty($page_header_style)) {
        $header_style = $page_header_style;
    }
}


// Get default header style from theme options
if ($header_style === 'default') {
    $theme_header_style = dreamsalon_fl_framework_getoptions('header_style');
    if (!empty($theme_header_style)) {
        $header_style = $theme_header_style;
    }
}

// Define the header template parts
$header_templates = [
    'style1' => 'templates/header/header-style-1',
    'style2' => 'templates/header/header-style-2',
    'style3' => 'templates/header/header-style-3',
    'default' => 'templates/header/header-default'
];

// Check if the selected header template exists
$template_found = false;
if (isset($header_templates[$header_style])) {
    $template_path = locate_template($header_templates[$header_style] . '.php');
    if (!empty($template_path)) {
        get_template_part($header_templates[$header_style]);
        $template_found = true;
    }
}

// Fallback to default header if no template was found
if (!$template_found) {
    get_template_part('templates/header/header-style-1');
}

?>

<?php
$hide_breadcrumb = get_post_meta(get_the_ID(), '_hide_breadcrumb', true);

// Get breadcrumb images from theme options
$breadcrumb_img_1 = dreamsalon_fl_framework_getoptions('breadcrumb_image_1');
$breadcrumb_img_2 = dreamsalon_fl_framework_getoptions('breadcrumb_image_2');
$breadcrumb_img_3 = dreamsalon_fl_framework_getoptions('breadcrumb_image_3');
$breadcrumb_img_4 = dreamsalon_fl_framework_getoptions('breadcrumb_image_4');
$breadcrumb_img_5 = dreamsalon_fl_framework_getoptions('breadcrumb_image_5');

if (empty($hide_breadcrumb)) {
    // Check page type and display breadcrumbs accordingly
    if (is_front_page()) {

    } else if (is_home()) { ?>
            <!-- Breadcrumb for Blog List -->
            <div class="breadcrumb-bar text-center">
            <?php if (!empty($breadcrumb_img_1['url'])): ?>
                    <img src="<?php echo esc_url($breadcrumb_img_1['url']); ?>" alt="breadcrumb-img-01"
                        class="breadcrumb-img-01 d-none d-lg-block">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_2['url'])): ?>
                    <img src="<?php echo esc_url($breadcrumb_img_2['url']); ?>" alt="breadcrumb-img-02"
                        class="breadcrumb-img-02 d-none d-lg-block">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_3['url'])): ?>
                    <img src="<?php echo esc_url($breadcrumb_img_3['url']); ?>" alt="breadcrumb-shadow-01" class="breadcrumb-shadow-01">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_4['url'])): ?>
                    <img src="<?php echo esc_url($breadcrumb_img_4['url']); ?>" alt="breadcrumb-shadow-02" class="breadcrumb-shadow-02">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_5['url'])): ?>
                    <img src="<?php echo esc_url($breadcrumb_img_5['url']); ?>" alt="breadcrumb-shadow-03" class="breadcrumb-shadow-03">
            <?php endif; ?>

                <div class="container">
                    <div class="row align-items-center text-center position-relative z-1">
                        <div class="col-md-12 col-12 breadcrumb-arrow">
                            <h2 class="breadcrumb-title mb-2 text-capitalize"><?php esc_html_e('Blog List', 'dreamsalon'); ?></h2>
                        <?php echo dreamsalon_breadcrumbs_header(); ?>
                        </div>
                    </div>
                </div>
            </div>
    <?php } else if (function_exists('is_product') && is_product()) { ?>
            <?php
            // Check if breadcrumbs should be displayed for products
            if (get_post_meta(dreamsalon_get_current_id(), 'dreamsalon_met_show_breadcrumbs', true) != 'no') { ?>
                    <!-- Breadcrumb for Products -->
                    <div class="breadcrumb-bar breadcrumb-bg-02 text-center">
                <?php if (!empty($breadcrumb_img_1['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_1['url']); ?>" alt="breadcrumb-img-01"
                                class="breadcrumb-img-01 d-none d-lg-block">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_2['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_2['url']); ?>" alt="breadcrumb-img-02"
                                class="breadcrumb-img-02 d-none d-lg-block">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_3['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_3['url']); ?>" alt="breadcrumb-shadow-01" class="breadcrumb-shadow-01">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_4['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_4['url']); ?>" alt="breadcrumb-shadow-02" class="breadcrumb-shadow-02">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_5['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_5['url']); ?>" alt="breadcrumb-shadow-03" class="breadcrumb-shadow-03">
                <?php endif; ?>

                        <div class="container">
                            <div class="row align-items-center text-center position-relative z-1">
                                <div class="col-md-12 col-12 breadcrumb-arrow">
                                    <h2 class="breadcrumb-title mb-2 text-capitalize"><?php esc_html_e('Product', 'dreamsalon'); ?></h2>
                                <?php
                                // Display WooCommerce breadcrumbs
                                $args = array(
                                    'delimiter' => '',
                                    'wrap_before' => '<ol class="breadcrumb">',
                                    'wrap_after' => '</ol>',
                                    'before' => '<li class="breadcrumb-item">',
                                    'after' => '</li>',
                                );
                                echo woocommerce_breadcrumb($args);
                                ?>
                                </div>
                            </div>
                        </div>
                    </div>
        <?php } ?>
    <?php } else if (is_single()) { ?>
                    <!-- Breadcrumb for Blog -->
                    <div class="breadcrumb-bar breadcrumb-bg-02 text-center">
            <?php if (!empty($breadcrumb_img_1['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_1['url']); ?>" alt="breadcrumb-img-01"
                                class="breadcrumb-img-01 d-none d-lg-block">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_2['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_2['url']); ?>" alt="breadcrumb-img-02"
                                class="breadcrumb-img-02 d-none d-lg-block">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_3['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_3['url']); ?>" alt="breadcrumb-shadow-01" class="breadcrumb-shadow-01">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_4['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_4['url']); ?>" alt="breadcrumb-shadow-02" class="breadcrumb-shadow-02">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_5['url'])): ?>
                            <img src="<?php echo esc_url($breadcrumb_img_5['url']); ?>" alt="breadcrumb-shadow-03" class="breadcrumb-shadow-03">
            <?php endif; ?>

                        <div class="container">
                            <div class="row align-items-center text-center position-relative z-1">
                                <div class="col-md-12 col-12 breadcrumb-arrow">
                                    <h2 class="breadcrumb-title mb-2 text-capitalize">
                                <?php
                                $post_type = get_post_type();
                                $post_type_obj = get_post_type_object($post_type);

                                if ($post_type_obj) {
                                    /* translators: %s: Post type label */
                                    printf(
                                        esc_html__('%s Details', 'dreamsalon'),
                                        esc_html($post_type_obj->labels->singular_name)
                                    );
                                } else {
                                    echo esc_html(get_the_title());
                                }
                                ?>
                                    </h2>
                        <?php echo dreamsalon_breadcrumbs_header(); ?>
                                </div>
                            </div>
                        </div>
                    </div>
    <?php } else if (is_search()) { ?>
                        <!-- Breadcrumb for Search -->
                        <div class="breadcrumb-bar breadcrumb-bg-02 text-center">
            <?php if (!empty($breadcrumb_img_1['url'])): ?>
                                <img src="<?php echo esc_url($breadcrumb_img_1['url']); ?>" alt="breadcrumb-img-01"
                                    class="breadcrumb-img-01 d-none d-lg-block">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_2['url'])): ?>
                                <img src="<?php echo esc_url($breadcrumb_img_2['url']); ?>" alt="breadcrumb-img-02"
                                    class="breadcrumb-img-02 d-none d-lg-block">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_3['url'])): ?>
                                <img src="<?php echo esc_url($breadcrumb_img_3['url']); ?>" alt="breadcrumb-shadow-01" class="breadcrumb-shadow-01">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_4['url'])): ?>
                                <img src="<?php echo esc_url($breadcrumb_img_4['url']); ?>" alt="breadcrumb-shadow-02" class="breadcrumb-shadow-02">
            <?php endif; ?>
            <?php if (!empty($breadcrumb_img_5['url'])): ?>
                                <img src="<?php echo esc_url($breadcrumb_img_5['url']); ?>" alt="breadcrumb-shadow-03" class="breadcrumb-shadow-03">
            <?php endif; ?>

                            <div class="container">
                                <div class="row align-items-center text-center position-relative z-1">
                                    <div class="col-md-12 col-12 breadcrumb-arrow">
                                        <h2 class="breadcrumb-title mb-2 text-capitalize">
                            <?php esc_html_e('Search query for:', 'dreamsalon'); ?>         <?php echo esc_html(get_search_query()); ?>
                                        </h2>
                        <?php echo dreamsalon_breadcrumbs_header(); ?>
                                    </div>
                                </div>
                            </div>
                        </div>
    <?php } else { ?>
            <?php
            // Check if breadcrumbs should be displayed for other pages
            if (get_post_meta(dreamsalon_get_current_id(), 'dreamsalon_met_show_breadcrumbs', true) != 'no') { ?>
                            <!-- Breadcrumb for Other Pages -->
                            <div class="breadcrumb-bar breadcrumb-bg-02 text-center">
                <?php if (!empty($breadcrumb_img_1['url'])): ?>
                                    <img src="<?php echo esc_url($breadcrumb_img_1['url']); ?>" alt="breadcrumb-img-01"
                                        class="breadcrumb-img-01 d-none d-lg-block">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_2['url'])): ?>
                                    <img src="<?php echo esc_url($breadcrumb_img_2['url']); ?>" alt="breadcrumb-img-02"
                                        class="breadcrumb-img-02 d-none d-lg-block">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_3['url'])): ?>
                                    <img src="<?php echo esc_url($breadcrumb_img_3['url']); ?>" alt="breadcrumb-shadow-01" class="breadcrumb-shadow-01">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_4['url'])): ?>
                                    <img src="<?php echo esc_url($breadcrumb_img_4['url']); ?>" alt="breadcrumb-shadow-02" class="breadcrumb-shadow-02">
                <?php endif; ?>
                <?php if (!empty($breadcrumb_img_5['url'])): ?>
                                    <img src="<?php echo esc_url($breadcrumb_img_5['url']); ?>" alt="breadcrumb-shadow-03" class="breadcrumb-shadow-03">
                <?php endif; ?>

                                <div class="container">
                                    <div class="row align-items-center text-center position-relative z-1">
                                        <div class="col-md-12 col-12 breadcrumb-arrow">
                                            <h2 class="breadcrumb-title mb-2">
                                <?php
                                $t = dreamsalon_heading_title();

                                // Remove HTML tags but keep the text content
                                $t = strip_tags($t);

                                // Output with proper formatting
                                echo esc_html($t);
                                ?>
                                            </h2>
                            <?php echo dreamsalon_breadcrumbs_header(); ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
        <?php } ?>
    <?php }
} ?>