Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: //tùy chỉnh mô tả danh mục sản phẩm hiển thị sau danh sách sản phẩm thay vì phía trên add_action( ‘wp’, ‘webdy_move_archive_description’ ); function webdy_move_archive_description()…
Lưu trữ tác giả: admin
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: /*thêm chữ “Giá: ” vào trước giá sản phẩm trên trang sản phẩm và giỏ hàng*/ add_filter( ‘woocommerce_get_price_html’, ‘webdy_change_product_price_display’ ); add_filter( ‘woocommerce_cart_item_price’, ‘webdy_change_product_price_display’ ); function…
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: // Hướng dẫn tạo hiệu ứng “Xem thêm / Thu gọn” cho phần mô tả sản phẩm function webdy_readmore_flatsome(){ ?> <style> .single-product div#tab-description { overflow:…
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: //mua nhanh add_action(‘woocommerce_after_add_to_cart_button’,’webdy_quickbuy_after_addtocart_button’); function webdy_quickbuy_after_addtocart_button(){ global $product; ?> <style> .webdy-quickbuy button.single_add_to_cart_button.loading:after { …
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: //khuyen mai function add_custom_text_before_add_to_cart() { ?> <div class=”khuyen-mai”><h4>Ưu đãi khi mua Theme tại chúng tôi:</h4> <li><span>Hỗ trợ cài đặt giao diện demo lên Hosting</span></li> <li><span>Tài…
// Add custom Theme Functions here add_filter(‘widget_text’,’execute_php’,100); function execute_php($html){ if(strpos($html,”<“.”?php”)!==false){ ob_start(); eval(“?”.”>”.$html); $html=ob_get_contents(); ob_end_clean(); } return $html; } Đoạn code này cho phép thực thi mã PHP trong nội dung của widget văn bản (Text Widget) trong WordPress bằng cách sử dụng bộ lọc widget_text. Khi người dùng nhập mã PHP vào widget, nó…
<style> /* Tùy chỉnh placeholder */ .search-field::placeholder { font-size: 16px; font-style: italic; color: #888; } </style> <script type=”text/javascript”> jQuery(document).ready(function ($) { !function (t) { “use…
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: // Hiệu ứng trỏ chuột function color_changing_cursor_effect() { ?> <div class=”color-changing-cursor”></div> <style> .color-changing-cursor { position: fixed; width: 15px; height: 15px; border-radius: 50%; pointer-events: none; z-index:…
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: //thông báo giờ đóng cửa add_action(‘wp_footer’, ‘webdy_store_hours_flatsome’); function webdy_store_hours_flatsome() { // Thiết lập múi giờ Việt Nam (UTC+7) date_default_timezone_set(‘Asia/Ho_Chi_Minh’);…
Mở file functions.php trong child theme của bạn (nếu chưa có child theme, bạn nên tạo child theme để tránh mất thay đổi khi update theme). Thêm đoạn code sau: //Chia sẻ bài viết lên mạng xã hội function custom_social_share_buttons($content) { if (is_single() || is_page()) { $url = urlencode(get_permalink()); $title = urlencode(get_the_title()); $facebook =…
