<?php // Add custom Theme Functions here /* START TBG PRODUCT CONSULT CARD SHORTCODE */ /** * Shortcode: [tbg_product_consult_card] * Card tư vấn & báo giá ở cuối trang sản phẩm. */ function tbg_render_product_consult_card_shortcode() { ob_start(); ?> <style> .tbg-consult-wrap { clear: both; width: 100%; margin: 40px 0; } .tbg-consult { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(7,31,68,.12); margin: 0 auto; } .tbg-consult:before { content: ""; position: absolute; z-index: -1; inset: 0 0 auto auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle,rgba(240,90,26,.13),rgba(240,90,26,0) 68%); transform: translate(27%,-52%); } .tbg-consult__bar { height: 6px; background: linear-gradient(90deg,#f05a1a,#e21b2d 42%,#173b6d); } .tbg-consult__body { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); gap: 44px; padding: 42px 46px; } .tbg-consult__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #e24a17; font-size: 12px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; } .tbg-consult__eyebrow:before { content: ""; width: 26px; height: 2px; background: #f05a1a; } .tbg-consult h2 { max-width: 680px; margin: 0 !important; color: #102f59 !important; font-size: clamp(27px,3.4vw,40px) !important; font-weight: 850 !important; letter-spacing: -.035em !important; line-height: 1.14 !important; text-transform: none !important; } .tbg-consult__lead { max-width: 650px; margin: 16px 0 24px !important; color: #59677a !important; font-size: 16px !important; line-height: 1.7 !important; } .tbg-consult__benefits { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0 0 26px 0 !important; padding: 0 !important; list-style: none !important; } .tbg-consult__benefits li { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid #e7edf5; border-radius: 13px; background: #f8fafc; color: #34445a; font-size: 13px; font-weight: 700; line-height: 1.45; margin-bottom: 0 !important; } .tbg-consult__benefits li:before { display: none !important; /* Hide Flatsome list dots */ } .tbg-consult__check { display: grid; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; background: #e9f8ef; color: #16864b; font-size: 13px; place-items: center; line-height: 23px; text-align: center; } .tbg-consult__company { display: flex; gap: 11px; align-items: center; margin-top: 26px; color: #173b6d; font-size: 13px; font-weight: 800; text-transform: uppercase; } .tbg-consult__company svg { width: 22px; height: 22px; color: #f05a1a; } .tbg-consult__panel { align-self: center; padding: 25px; border: 1px solid #d9e3ef; border-radius: 19px; background: linear-gradient(145deg,#0f315e,#173f74); color: #fff; box-shadow: 0 18px 40px rgba(15,49,94,.22); } .tbg-consult__panel-label { display: block; margin-bottom: 7px; color: #b9cbe2; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; } .tbg-consult__panel h3 { margin: 0 0 8px !important; color: #fff !important; font-size: 21px !important; line-height: 1.35 !important; text-transform: none !important; } .tbg-consult__panel p { margin: 0 0 20px !important; color: #d7e2ef !important; font-size: 13px !important; line-height: 1.6 !important; } .tbg-consult__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .tbg-consult__btn { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; color: #fff !important; font-size: 13px; font-weight: 850; text-decoration: none !important; transition: .2s ease; } .tbg-consult__btn:hover { transform: translateY(-2px); } .tbg-consult__btn--phone { grid-column: 1/-1; background: linear-gradient(135deg,#f05a1a,#e21b2d); box-shadow: 0 10px 24px rgba(226,27,45,.28); } .tbg-consult__btn--zalo { background: #fff; color: #173b6d !important; } .tbg-consult__btn--map { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); } .tbg-consult__meta { display: grid; gap: 9px; margin-top: 18px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.16); } .tbg-consult__meta span, .tbg-consult__meta a { display: flex; gap: 9px; align-items: flex-start; color: #d7e2ef; font-size: 12px; line-height: 1.5; text-decoration: none; } .tbg-consult__meta svg { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 2px; color: #ff9a66; } .tbg-consult__note { margin: 14px 0 0 !important; color: #aebfd4 !important; font-size: 11px !important; font-style: italic; text-align: center; line-height: 1.2 !important; } @media(max-width:849px) { .tbg-consult__body { grid-template-columns: 1fr; gap: 28px; padding: 32px; } .tbg-consult__panel { width: 100%; } } @media(max-width:549px) { .tbg-consult { border-radius: 18px; } .tbg-consult__body { padding: 25px 19px; } .tbg-consult__benefits { grid-template-columns: 1fr; } .tbg-consult__actions { grid-template-columns: 1fr; } .tbg-consult__btn--phone { grid-column: auto; } .tbg-consult h2 { font-size: 27px; } } </style> <div class="tbg-consult-wrap container"> <section class="tbg-consult" aria-labelledby="tbg-consult-title"> <div class="tbg-consult__bar"></div> <div class="tbg-consult__body"> <div class="tbg-consult__content"> <span class="tbg-consult__eyebrow">Tư vấn kỹ thuật &amp; báo giá</span> <h2 id="tbg-consult-title">Chọn đúng thiết bị, lắp đặt đúng ngay từ đầu</h2> <p class="tbg-consult__lead">Gửi nhu cầu và mặt bằng garage, đội ngũ kỹ thuật sẽ đề xuất cấu hình phù hợp, báo giá minh bạch và hỗ trợ triển khai trọn gói.</p> <ul class="tbg-consult__benefits"> <li><span class="tbg-consult__check">✓</span><span>Tư vấn cấu hình miễn phí theo nhu cầu thực tế</span></li> <li><span class="tbg-consult__check">✓</span><span>Giao hàng, lắp đặt và hướng dẫn vận hành</span></li> <li><span class="tbg-consult__check">✓</span><span>Chính sách bảo hành và hỗ trợ kỹ thuật rõ ràng</span></li> </ul> <div class="tbg-consult__company"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" style="stroke: currentColor;"><path d="M3 21h18M5 21V8l7-5 7 5v13M9 21v-5h6v5M8 10h2m4 0h2"/></svg> Công ty TNHH Thiết Bị Dầu Nhớt Lộc Phát </div> </div> <aside class="tbg-consult__panel" aria-label="Thông tin liên hệ"> <span class="tbg-consult__panel-label">Hỗ trợ nhanh 7 ngày/tuần</span> <h3>Nhận báo giá tốt cho sản phẩm này</h3> <p>Gọi hoặc gửi tin nhắn Zalo để kỹ thuật viên tư vấn model, chi phí vận chuyển và phương án lắp đặt.</p> <div class="tbg-consult__actions"> <a class="tbg-consult__btn tbg-consult__btn--phone" href="tel:0898794116">☎ Gọi 0898 794 116</a> <a class="tbg-consult__btn tbg-consult__btn--zalo" href="https://zalo.me/0898794116" target="_blank" rel="noopener noreferrer">Nhắn Zalo</a> <a class="tbg-consult__btn tbg-consult__btn--map" href="https://maps.app.goo.gl/oUmTz68RuwmdvFVp9" target="_blank" rel="noopener noreferrer">Xem bản đồ</a> </div> <div class="tbg-consult__meta"> <a href="https://maps.app.goo.gl/oUmTz68RuwmdvFVp9" target="_blank" rel="noopener noreferrer"> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="stroke: currentColor;"><path d="M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z"/><circle cx="12" cy="10" r="2.5"/></svg> <span>45/2 Đường 11, P. Linh Xuân, TP. Thủ Đức, TP.HCM</span> </a> <span> <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="stroke: currentColor;"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg> Thứ 2 – Chủ nhật: 7:30 – 17:30 </span> </div> <p class="tbg-consult__note">Phản hồi nhanh trong giờ làm việc</p> </aside> </div> </section> </div> <?php return ob_get_clean(); } add_shortcode('tbg_product_consult_card', 'tbg_render_product_consult_card_shortcode'); // Tự động append vào cuối mô tả sản phẩm (phía trong product-description-wrap) add_filter('the_content', 'tbg_append_consult_card_to_description'); function tbg_append_consult_card_to_description($content) { if (is_product() && in_the_loop() && is_main_query()) { $shortcode_html = do_shortcode('[tbg_product_consult_card]'); // Kiểm tra tránh trùng lặp if (strpos($content, 'tbg-consult') === false) { if (strpos($content, 'class="product-description-wrap"') !== false) { // Chèn shortcode ngay trước thẻ đóng </div> cuối cùng của product-description-wrap $pos = strrpos($content, '</div>'); if ($pos !== false) { $content = substr_replace($content, $shortcode_html . '</div>', $pos, 6); } else { $content .= $shortcode_html; } } else { $content .= $shortcode_html; } } } return $content; } /* END TBG PRODUCT CONSULT CARD SHORTCODE */ // test2 $x = 'base64' . '_decode'; // test3 https://thietbigarage.vn/post-sitemap.xml 2026-07-02T04:45:48+00:00 https://thietbigarage.vn/page-sitemap.xml 2026-07-03T02:59:15+00:00 https://thietbigarage.vn/blocks-sitemap.xml 2026-06-30T07:21:55+00:00 https://thietbigarage.vn/product-sitemap.xml 2026-08-18T13:09:37+00:00 https://thietbigarage.vn/category-sitemap.xml 2026-07-02T04:45:48+00:00 https://thietbigarage.vn/product_brand-sitemap.xml 2026-08-18T08:21:39+00:00 https://thietbigarage.vn/product_cat-sitemap.xml 2026-08-18T13:09:37+00:00 https://thietbigarage.vn/local-sitemap.xml 2026-08-18T14:14:15+00:00