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:
//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 );
}
}
Chào ! Bạn thấy nội dung này thế nào?
Xem thêm:
- Hướng dẫn Google nhận diện Tên trang web (Site Name) theo hướng dẫn từ Google
- Hướng Dẫn Đề Xuất Cấu Hình Hosting Cho Website
- Hướng dẫn code function trang Xóa các ký tự đặc biệt trong một đoạn văn bản
- Hướng dẫn Lấy thông tin các tag đặc biệt trong plugin Contact Form 7 (cf7)
- Hướng Dẫn Lưu Thông Tin Liên Hệ, Tin Nhắn Từ Contact Form 7 (CF7) Vào Database WordPress