Category

Wordpress

44 articles in this category

Thêm kích thước cắt ảnh media wordpress

18 Tháng 6, 2019 1 min read

Thêm đoạn dưới vào funtion.php // Make sure featured images are enabled add_theme_support( ‘post-thumbnails’ ); // Add featured image sizes add_image_size( ‘featured-large’, 640, 294, true ); // width,…

Thêm mã nhúng vào thẻ head, body

18 Tháng 6, 2019 1 min read

Hướng dẫn thêm mã nhúng Google Google Tag Manager (hoặc bất kỳ mã nhúng khác) vào thẻ head function akasa_add_header() {?> <!– Google Tag Manager –> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’: new…

Một số đoạn code htaccess hay

9 Tháng 6, 2019 1 min read

1. Chuyển hướng url đuôi html xang không có html RewriteCond %{THE_REQUEST} \.html RewriteRule ^(.*)\.html$ /$1 [R=301,L] 2. Chuyển hướng danh mục RewriteEngine On RewriteRule ^subdirectory/(.*)$ /$1 [R=301,NC,L]…

Tùy biến mã đơn hàng woocommerce

1 Tháng 6, 2019 1 min read

Thêm đoạn sau vào funtions // Tùy biến oder number add_filter( 'woocommerce_order_number', 'change_woocommerce_order_number' ); function change_woocommerce_order_number( $order_id ) { $order = wc_get_order( $order_id ); // Truy cập trường…

Ẩn các trường trong admin không dùng trong woocommer

26 Tháng 5, 2019 2 min read

Ẩn tab attribute cho product type Woocommerce   function remove_linked_products($tabs){ unset($tabs['general']); unset($tabs['inventory']); unset($tabs['shipping']); unset($tabs['linked_product']); unset($tabs['attribute']); unset($tabs['advanced']); return($tabs); } add_filter('woocommerce_product_data_tabs', 'remove_linked_products', 10, 1); Nguồn: https://www.themelocation.com/how-to-remove-product-panel-tabs-admin-panel-in-woocommerce/ function remove_tab($tabs){ unset($tabs[‘inventory’]); //…

Đổi tên nút Thêm vào giỏ hàng thành Mua Ngay

21 Tháng 4, 2019 1 min read

Thêm đoạn sau vào funtion /* * Thay đổi text nút thêm vào giỏ hàng => Mua ngay ở danh mục */ add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woo_custom_cart_button_text’ ); // 2.1…