Hướng dẫn 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
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:
1 2 3 4 5 6 7 8 9 10 11 |
//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() { if ( is_archive() ) { remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 ); remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_taxonomy_archive_description', 10 ); add_action( 'woocommerce_after_main_content', 'woocommerce_product_archive_description', 10 ); } } |
Quý khách cần tư vấn thiết kế web giá rẻ, vui lòng nhấn nút bên dưới:
Chào ! Bạn thấy nội dung này thế nào?
Xem thêm:
- Hướng dẫn tạo hiệu ứng placeholder typewriter (gõ chữ) cho ô tìm kiếm
- Phi Linh Wedding – Pocket Planner for Your Wedding
- Từ ‘Vô Danh’ Đến Top 1 Google: Chiến Lược Phân Tích & Vượt Mặt Đối Thủ
- Hướng dẫn code function Tạo mật khẩu (password) cho bài viết (post) để xem tiếp
- Samydo – Trung tâm đào tạo kỹ năng trẻ em toàn diện