HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/TBbargain/wp-content/themes/Tbbargain/header.php
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TB Bargain</title>
    <link rel="icon" type="image/x-icon" href="<?php echo get_template_directory_uri(); ?>/img/favicon.ico" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css"
        integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css">
    
    <link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/common.css">
    <link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/header.css">
    <link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/footer.css">
    <link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/style.css">
    <link rel="stylesheet" href="<?php echo esc_url(get_template_directory_uri()); ?>/css/home.css">
    <?php wp_head(); ?>
</head>

<body>

    <section class="header">
        <div class="container custom-container header-wrap">
            <figure class="logo">
               <a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php echo get_template_directory_uri(); ?>/img/logo.svg" alt="" class="img"></a>
            </figure>
            <div class="search">
                <!-- <input type="text" name="s" class="txt" placeholder="Search...">
                <img src="<?php echo get_template_directory_uri(); ?>/img/search.svg" alt="" class="img"> -->
                <!-- <form method="get" action="<?php echo esc_url(home_url('/')); ?>">
                    <input type="text" name="s" class="txt" placeholder="Search..." />
                    <button type="submit"><img src="<?php echo get_template_directory_uri(); ?>/img/search.svg" alt="" class="img"></button>
                </form> -->
                <form method="get" action="<?php echo esc_url(home_url('/')); ?>">
                    <input type="text" name="s" class="txt" placeholder="Search..." />
                    <button type="submit" class="btn-search">
                        <img src="<?php echo get_template_directory_uri(); ?>/img/search.svg" alt="" class="img">
                    </button>
                </form>

            </div>

            <div class="whatsapp">
                <button class="btn"> <img src="<?php echo get_template_directory_uri(); ?>/img/whatsapp.svg" alt=""> Join On WhatsApp</button>
            </div>
        </div>
    </section>


    <section class="header-menu">
        <div class="container custom-container header-wrap">
            <nav class="navbar navbar-expand-xl navbar-light bg-transparent">
                  <button class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                  </button>
                  <div class="collapse navbar-collapse" id="navbarSupportedContent">
                  <ul class="navbar-nav mx-auto mb-2 mb-lg-0">
                  <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="<?php echo esc_url(home_url('/')); ?>">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                                <g fill="none" stroke="#22bb63" stroke-linecap="round" stroke-linejoin="round"
                                    stroke-width="2" data-name="vuesax/twotone/home-2">
                                    <path
                                        d="m9.02 2.84-5.39 4.2A4.759 4.759 0 0 0 2 10.36v7.41a4.225 4.225 0 0 0 4.21 4.22h11.58A4.223 4.223 0 0 0 22 17.78V10.5a4.723 4.723 0 0 0-1.8-3.45l-6.18-4.333a4.487 4.487 0 0 0-5 .123Z" />
                                    <path d="M12 17.99v-3" data-name="Vector" opacity=".34" />
                                </g>
                            </svg>
                            Home</a>
                      </li>

                    <?php
                    $parent_category = get_term_by('slug', 'deal-category', 'product_category');
                    $categories = get_terms(array(
                        'taxonomy' => 'product_category', // Custom taxonomy name
                        'hide_empty' => false,             // Hide categories with no posts
                        'parent'     => $parent_category->term_id,
                    ));

                    // Check if categories exist and are not errors
                    if (!empty($categories) && !is_wp_error($categories)) {
                        $first_item = true;
                        foreach ($categories as $category) {
                            // Generate the category link
                            $cat_link = get_term_link($category);

                            // Exclude specific categories if needed (e.g., 'example-category')
                            if ($category->slug !== 'example-category') {
                                $cat_link = get_term_link($category);

                                // Check if the current page is the category page
                                $is_active = (is_tax('product_category', $category->term_id)) ? 'active' : '';

                                // Get the category icon (assuming the field is named '_category_icon')
                                $category_icon = get_term_meta($category->term_id, '_category_icon', true);

                                ?>
                                <li class="nav-item <?php echo esc_attr($is_active); ?>">
                                    <a class="nav-link" href="<?php echo esc_url($cat_link); ?>">
                                        <?php if ($category_icon): ?>
                                            <img src="<?php echo esc_url($category_icon); ?>" alt="<?php echo esc_attr($category->name); ?>" class="category-icon" >
                                        <?php endif; ?>
                                        <?php echo esc_html($category->name); ?>
                                    </a>
                                </li>
                                <?php
                                $first_item = false; // Set first_item to false after the first iteration
                            }
                        }
                    } else {
                        echo '<p>No categories found.</p>';
                    }
                    ?>
                      <!-- <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="#">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                                <g fill="none" stroke="#22bb63" stroke-linecap="round" stroke-linejoin="round"
                                    stroke-width="2" data-name="vuesax/twotone/home-2">
                                    <path
                                        d="m9.02 2.84-5.39 4.2A4.759 4.759 0 0 0 2 10.36v7.41a4.225 4.225 0 0 0 4.21 4.22h11.58A4.223 4.223 0 0 0 22 17.78V10.5a4.723 4.723 0 0 0-1.8-3.45l-6.18-4.333a4.487 4.487 0 0 0-5 .123Z" />
                                    <path d="M12 17.99v-3" data-name="Vector" opacity=".34" />
                                </g>
                            </svg>
                            Home</a>
                      </li>
                      <li class="nav-item">
                        <a class="nav-link" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                            <g fill="none" stroke="#223158" stroke-linecap="round" stroke-linejoin="round"
                                stroke-width="2" data-name="vuesax/twotone/milk">
                                <path
                                    d="M18 15v4a3.009 3.009 0 0 1-3 3H9a3.009 3.009 0 0 1-3-3v-5.02l3.89.02a4.711 4.711 0 0 1 2.11.5 4.721 4.721 0 0 0 2.12.5Z" />
                                <path
                                    d="M18 10.83V15h-3.88a4.721 4.721 0 0 1-2.12-.5 4.711 4.711 0 0 0-2.11-.5L6 13.98v-3.15a2.289 2.289 0 0 1 .59-1.42l2.12-2.12a1.009 1.009 0 0 0 .29-.7V5h6v1.59a1.009 1.009 0 0 0 .29.7l2.12 2.12a2.289 2.289 0 0 1 .59 1.42Z"
                                    data-name="Vector" opacity=".4" />
                                <path d="M18 16v-1M6 14.98v-1M14.5 5h-5a1.5 1.5 0 0 1 0-3h5a1.5 1.5 0 0 1 0 3Z"
                                    data-name="Vector" />
                            </g>
                        </svg> Grocery</a>
                      </li>
        
                      <li class="nav-item">
                        <a class="nav-link" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="22" viewBox="0 0 18 22">
                            <g fill="none" stroke="#223158" stroke-linecap="round" stroke-linejoin="round"
                                stroke-width="2" data-name="vuesax/twotone/mobile">
                                <path d="M17 6v10c0 4-1 5-5 5H6c-4 0-5-1-5-5V6c0-4 1-5 5-5h6c4 0 5 1 5 5Z" />
                                <path d="M11 4.5H7M10.55 16.55A1.55 1.55 0 1 1 9 15a1.55 1.55 0 0 1 1.55 1.55Z"
                                    data-name="Vector" opacity=".4" />
                            </g>
                        </svg> Mobile</a>
                      </li>
        
                      <li class="nav-item">
                        <a class="nav-link" href="#">
                            <svg xmlns="http://www.w3.org/2000/svg" width="23.446" height="21.51"
                            viewBox="0 0 23.446 21.51">
                            <g fill="#223158" stroke-width=".5" data-name="Group 12">
                                <path stroke="#223158"
                                    d="M5.664 17.063H3.322a2.308 2.308 0 0 1-2.228-2.85l1.337-5.349a2.287 2.287 0 0 1 2.05-1.721v.749a.382.382 0 1 0 .764 0v-.764h8.406v.764a.382.382 0 1 0 .764 0v-.749a2.286 2.286 0 0 1 2.048 1.72l1.218 4.887a.382.382 0 0 0 .741-.185l-1.223-4.891a3.054 3.054 0 0 0-2.789-2.307v-1.15a4.968 4.968 0 1 0-9.935 0v1.154a3.054 3.054 0 0 0-2.789 2.307l-1.337 5.35a3.059 3.059 0 0 0 2.969 3.8h2.346a.383.383 0 0 0 0-.765ZM5.243 5.217a4.203 4.203 0 0 1 8.406 0v1.146H5.244Z"
                                    data-name="Path 4" />
                                <path stroke="#223158"
                                    d="M14.796 10.567a.382.382 0 0 0-.382-.382H4.477a.382.382 0 0 0 0 .764h9.935a.382.382 0 0 0 .384-.382Z"
                                    data-name="Path 5" />
                                <path stroke="#223158"
                                    d="M13.268 11.331v.764a.382.382 0 0 0 .764 0v-.764a.382.382 0 0 0-.764 0Z"
                                    data-name="Path 6" />
                                <path stroke="#223158"
                                    d="M22.053 16.68h-.2a3.441 3.441 0 0 0-6.655.764h-.809a3.441 3.441 0 0 0-6.655-.764 1.16 1.16 0 1 0 0 2.293 3.441 3.441 0 0 0 6.655-.764h.809a3.441 3.441 0 0 0 6.655.764 1.154 1.154 0 1 0 .2-2.293Zm-14.52 1.528a.382.382 0 0 1 0-.764Zm3.439 2.293a2.675 2.675 0 1 1 2.681-2.675 2.678 2.678 0 0 1-2.678 2.675Zm7.642 0a2.675 2.675 0 1 1 2.675-2.675 2.678 2.678 0 0 1-2.672 2.675Zm3.439-2.293v-.764a.382.382 0 0 1 0 .764Z"
                                    data-name="Path 7" />
                                <path stroke="#a6acbc"
                                    d="M15.942 5.218c.632 0 1.146.685 1.146 1.528a.382.382 0 0 0 .764 0c0-.843.514-1.528 1.146-1.528a.385.385 0 0 0 .271-.653.464.464 0 0 0-.271-.111c-.632 0-1.146-.685-1.146-1.528a.379.379 0 0 0-.683-.224.373.373 0 0 0-.081.224c0 .843-.514 1.528-1.146 1.528a.382.382 0 0 0 0 .764Zm1.528-.923a2.129 2.129 0 0 0 .475.541 2.13 2.13 0 0 0-.475.541 2.129 2.129 0 0 0-.475-.541 2.13 2.13 0 0 0 .476-.541Z"
                                    data-name="Path 8" />
                                <path stroke="#a6acbc"
                                    d="M19.381 11.331c.632 0 1.146.685 1.146 1.528a.382.382 0 0 0 .764 0c0-.843.514-1.528 1.146-1.528a.381.381 0 0 0 .127-.739 1.394 1.394 0 0 1-1.272-1.549.382.382 0 0 0-.764 0c0 .843-.514 1.528-1.146 1.528a.382.382 0 0 0 0 .764Zm1.528-.923a2.129 2.129 0 0 0 .475.541 2.129 2.129 0 0 0-.475.541 2.129 2.129 0 0 0-.475-.541 2.13 2.13 0 0 0 .476-.541Z"
                                    data-name="Path 9" />
                                <path stroke="#a6acbc"
                                    d="M.435 4.368a.373.373 0 0 0 .223.08c.632 0 1.146.685 1.146 1.528a.382.382 0 0 0 .764 0c0-.843.514-1.528 1.146-1.528a.382.382 0 0 0 0-.764c-.632 0-1.146-.685-1.146-1.528a.382.382 0 0 0-.764 0c0 .843-.514 1.528-1.146 1.528a.38.38 0 0 0-.223.684Zm1.752-.843a2.129 2.129 0 0 0 .475.541 2.13 2.13 0 0 0-.475.541 2.129 2.129 0 0 0-.475-.539 2.129 2.129 0 0 0 .475-.541Z"
                                    data-name="Path 10" />
                            </g>
                        </svg> Fashion</a>
                      </li>
                      <li class="nav-item">
                        <a class="nav-link" href="#">                       <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                            <g fill="none" stroke="#223158" stroke-linecap="round" stroke-linejoin="round"
                                data-name="vuesax/twotone/game">
                                <g stroke-width="1.5" data-name="Group 698" opacity=".4">
                                    <path d="m9.57 12.46-3.05 3.05" />
                                    <path d="m6.55 12.49 3.05 3.05" data-name="Vector" />
                                </g>
                                <path stroke-width="2" d="M13.53 14h.01M17.47 14h.01M15.5 15.98v-.02M15.5 12.04v-.02"
                                    data-name="Vector" opacity=".4" />
                                <path stroke-width="2"
                                    d="M9 22h6c5 0 7-2 7-7v-2c0-5-2-7-7-7H9c-5 0-7 2-7 7v2c0 5 2 7 7 7Z"
                                    data-name="Vector" />
                                <path stroke-width="2" d="M13.01 2 13 3.01A1 1 0 0 1 12 4h-.03a1 1 0 0 0 .01 2h1"
                                    data-name="Vector" />
                            </g>
                        </svg> Electronics</a>
                    </li>
        
                    <li class="nav-item">
                        <a class="nav-link" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                            <g fill="none" stroke="#223158" stroke-linecap="round" stroke-linejoin="round"
                                data-name="vuesax/twotone/building-3">
                                <path stroke-width="2" d="M2 22h20" />
                                <path stroke-width="2"
                                    d="m15.01 21.989-12 .02L3 7.07a2.005 2.005 0 0 1 .89-1.66l4-2.67a1.994 1.994 0 0 1 2.22 0l4 2.67A1.981 1.981 0 0 1 15 7.07Z"
                                    data-name="Vector" />
                                <path stroke-width="2" d="M19.98 22.01V18" data-name="Vector" opacity=".4" />
                                <path stroke-width="2"
                                    d="M20 12a2.006 2.006 0 0 0-2 2v2a2 2 0 0 0 4 0v-2a2.006 2.006 0 0 0-2-2ZM3 14h12"
                                    data-name="Vector" />
                                <path stroke-width="2" d="M9 22v-3.75" data-name="Vector" opacity=".4" />
                                <path stroke-width="1.5" d="M10.5 9A1.5 1.5 0 1 1 9 7.5 1.5 1.5 0 0 1 10.5 9Z"
                                    data-name="Vector" opacity=".4" />
                            </g>
                        </svg> Home & Furniture</a>
                    </li>
        
                    <li class="nav-item">
                        <a class="nav-link" href="#">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                                <g fill="none" stroke="#223158" stroke-linecap="round" stroke-linejoin="round"
                                    stroke-width="2" data-name="vuesax/twotone/printer">
                                    <path d="M7.25 7h9.5V5c0-2-.75-3-3-3h-3.5c-2.25 0-3 1-3 3Z" opacity=".4" />
                                    <path d="M16 15v4a2.652 2.652 0 0 1-3 3h-2a2.652 2.652 0 0 1-3-3v-4Z"
                                        data-name="Vector" />
                                    <path
                                        d="M21 10v5a2.652 2.652 0 0 1-3 3h-2v-3H8v3H6a2.652 2.652 0 0 1-3-3v-5a2.652 2.652 0 0 1 3-3h12a2.652 2.652 0 0 1 3 3ZM17 15H7"
                                        data-name="Vector" />
                                    <path d="M7 11h3" data-name="Vector" opacity=".4" />
                                </g>
                            </svg> Appliances
                        </a>
                    </li>
        
                    <li class="nav-item">
                        <a class="nav-link" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
                            <g fill="none" stroke="#223158" stroke-linecap="round" stroke-linejoin="round"
                                stroke-width="2" data-name="vuesax/twotone/brush">
                                <path
                                    d="M21.81 3.94a33.727 33.727 0 0 1-8.63 11.65l-1.97 1.58a3.588 3.588 0 0 1-.78.45 3.728 3.728 0 0 0-.04-.57 3.916 3.916 0 0 0-1.16-2.29 4.084 4.084 0 0 0-2.36-1.19 4.007 4.007 0 0 0-.6-.01 2.614 2.614 0 0 1 .49-.84l1.56-1.97a33.629 33.629 0 0 1 11.65-8.64 1.4 1.4 0 0 1 1.52.31 1.358 1.358 0 0 1 .32 1.52Z" />
                                <path
                                    d="M10.43 17.62a4.17 4.17 0 0 1-1.21 2.95 4.156 4.156 0 0 1-2.435 1.16l-2.46.27a2.114 2.114 0 0 1-2.33-2.35l.27-2.46a4.077 4.077 0 0 1 4.015-3.634 5.956 5.956 0 0 1 .6.01 4.025 4.025 0 0 1 2.36 1.19 3.916 3.916 0 0 1 1.16 2.29c.01.194.03.384.03.574Z"
                                    data-name="Vector" />
                                <path d="M14.24 14.47a4.733 4.733 0 0 0-4.73-4.73" data-name="Vector" opacity=".4" />
                            </g>
                        </svg> Beauty And Toys</a>
                    </li> -->
                      
                    </ul>
                  </div>
              </nav>
        </div>
    </section>