Archives : Tháng 3-2019

the_post_thumbnail( 'thumbnail' ); Cấu hình tỉ lệ ảnh đại diện: Cài đặt => Thư viện (tiếng anh không nhớ lắm ^^) Bulild lại ảnh đại diện, chúng ta sử dụng 1 trong 2 plugin sau: AJAX Thumbnail Rebuild Force Regenerate Thumbnails   Tham khảo thêm lấy ảnh đại diện: //Default WordPress the_post_thumbnail( 'thumbnail' );     // Thumbnail (150 x 150 hard ..

Read more

Thêm đoạn css này vào body body { -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } Thêm đoạn JavaScript này file site.js thường viết của bên mình. <script language=”JavaScript”> window.onload = function() { document.addEventListener(“contextmenu”, function(e) { e.preventDefault(); }, false); document.addEventListener(“keydown”, function(e) { //document.onkeydown = function(e) { // “I” key if (e.ctrlKey ..

Read more

Xóa bỏ product-category và toàn bộ slug của danh mục cha khỏi đường dẫn của Woocommerce Tham khảo bài viết: https://levantoan.com/xoa-bo-product-category-va-toan-bo-slug-cua-danh-muc-cha-khoi-duong-dan-cua-woocommerce/ https://levantoan.com/huong-dan-xoa-product-product_cat-trong-duong-dan-cua-woocommerce/ http://support.vietmoz.info/bo-tien-to-san-pham-va-danh-muc-tren-url-cua-woocommerce Mặc định chúng ta có Danh mục sản phẩm: http://domain.com/product-category/may-tinh Danh mục con cấp 1: http://domain.com/product-category/may-tinh/may-tinh-de-ban Danh mục con cấp 2: http://domain.com/product-category/may-tinh/may-tinh-de-ban/may-tinh-dell Sau khi áp dụng đoạn code này chúng ta có: ..

Read more

1. Cấu hình như ảnh bên dưới: 2. Cấu hình file: – /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/nginx/force-https-http2.tpl Thêm dòng: return 301 https://$host$request_uri; dưới dòng error_log /usr/local/apache/domlogs/%domain%.error.log error; Mục đích chuyển hướng http xang https bằng nginx – /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/nginx/force-https-http2.stpl Thêm đoạn: ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate %ssl_cert_path%/%domain%.bundle; resolver 8.8.8.8 8.8.4.4; Dưới đoạn: ssl_session_timeout 60m; Mục đích cached SSL vào trình duyệt. 3. Rebuild all vhosts ..

Read more