// Add custom Theme Functions here add_filter('use_block_editor_for_post', '__return_false'); //Them star rating trang chủ function show_rating( $rating_html, $rating, $count ) { $rating_html = '
'; $rating_html .= wc_get_star_rating_html( $rating, $count ); $rating_html .= '
'; return $rating_html; }; add_filter( 'woocommerce_product_get_rating_html', 'show_rating', 100, 3 ); //Thay gia bang lien he function custom_price(){ return '0936669983'; } add_filter('woocommerce_empty_price_html', 'custom_price'); //------------------------------------- Code chèn ngày tháng tự động -------------------------// //* Kich hoat Shortcode cho tieu đe bai viet. add_filter( 'the_title', 'do_shortcode' ); //* Kich hoat Shortcode cho plugin SEO Yoast add_filter( 'wpseo_title', 'do_shortcode' ); add_filter( 'wpseo_metadesc', 'do_shortcode' ); //* Kich hoat Shortcode cho plugin Rank Math add_filter( 'rank_math/frontend/title', function( $title ) { $title = do_shortcode($title); return $title; }); add_filter( 'rank_math/frontend/description', function( $description ) { $description = do_shortcode($description); return $description; }); // * Shortcode hien thi thoi gian hien tai. // * shortcode: [nam] add_shortcode ('nam', 'get_hienthinam'); function get_hienthinam () { $hienthinam= date ("Y"); // * Thay đổi định dạng tại đây return "$hienthinam"; } // * shortcode: [thang] add_shortcode ('thang', 'get_hienthithang'); function get_hienthithang () { $hienthithang= date ("m"); // * Thay đổi định dạng tại đây return "$hienthithang"; } // * shortcode: [ngay] add_shortcode ('ngay', 'get_hienthingay'); function get_hienthingay () { $hienthingay= date ("d"); // * Thay đổi định dạng tại đây return "$hienthingay"; } // * shortcode: [thang_nam] add_shortcode ('thang_nam', 'get_hienthithangnam'); function get_hienthithangnam () { $hienthithangnam= date ("m/Y"); // * Thay đổi định dạng tại đây return "$hienthithangnam"; } // * shortcode: [hienthithangnam] add_shortcode ('ngay_thang_nam', 'get_hienthingaythangnam'); function get_hienthingaythangnam () { $hienthingaythangnam= date ("d/m/Y"); // * Thay đổi định dạng tại đây return "$hienthingaythangnam"; } /* Đặt nút close vào bên trong lightbox*/ add_filter( 'flatsome_lightbox_close_btn_inside', '__return_true' ); /*Remove p tag automatically in CF7*/ add_filter('wpcf7_autop_or_not', '__return_false'); /*=======Preload feature image of wocommerce product====================*/ function get_featured_image_preload_url() { $product_id = get_the_ID(); // Lấy ID sản phẩm $image_id = get_post_thumbnail_id( $product_id ); // Lấy ID ảnh đại diện $image_url = wp_get_attachment_image_src( $image_id, 'full' ); // Lấy URL ảnh kích thước gốc return $image_url ? $image_url[0] : ''; // Trả về URL ảnh hoặc rỗng nếu không có } add_action( 'wp_head', 'preload_featured_image' ); function preload_featured_image() { if ( is_product() ) { // Kiểm tra xem có phải trang sản phẩm WooCommerce hay không $featured_image_url = get_featured_image_preload_url(); if( $featured_image_url ) { echo ''; } } } /*======Remove jquery do ko dung den trong trang Product ======*/ add_action( 'wp_enqueue_scripts', 'dequeue_jquery_min_js', 99 ); function dequeue_jquery_min_js() { if ( is_product() ) { // Kiểm tra xem có phải trang sản phẩm WooCommerce hay không // wp_dequeue_script( 'flatsome-jquery' ); // Loại bỏ file `jquery.min.js` wp_deregister_script('jquery'); wp_deregister_style('flatsome'); // Loại bỏ file `flatsome.css` } } Kính xe BMW - Kính ô tô Thiên Kế

Hiển thị 25–33 của 33 kết quả

Đăng ký tư vấn ngay Gọi Hotline ngay Chat Zalo với chúng tôi Chat Facebook với chúng tôi Đăng ký tư vấn ngay Gọi Hotline ngay Chat Zalo với chúng tôi Chat Facebook với chúng tôi
mail
ĐĂNG KÝ TƯ VẤN NGAY
icon
icon