Zubi Cloud hướng dẫn 1 thủ thuật cực hay dành cho những người đang thiết kế Theme WordPress chuyên nghiệp, làm sao để tùy biến giao diện khác nhau trang sản phẩm Single Product theo từng Catagory trong Woocommerce.
Để làm được việc đó khá đơn giản, chú ý cách này áp dụng cho những người thiết kế theme WordPress dạng child theme. Có nghĩa là thư mục woocommerce sẽ được Coppy vào bên trong thư mục Theme mà bạn đang dùng.
Ví dụ như sau:
/home/store.zumi.media/public_html/wp-content/themes/zubicloudtheme
Hướng dẫn tùy biến Single Product theo từng Catagory trong Woocommerce như sau:
Chú ý: Cách này chỉ áp dụng cho Catagory gốc, ko áp dụng cho Sub catagory
Bước 1: Mở file single.php
Tìm đoạn code sau:
<?php while ( have_posts() ) : the_post(); get_template_part( 'template-parts/post/content', get_post_format() ); if ( comments_open() || get_comments_number() ) : comments_template(); endif; endwhile; ?>
Hãy thay thế đoạn code:
get_template_part( 'template-parts/post/content', get_post_format() );
thành đoạn code sau:
if( has_term( array( 'themes', 'fridge', 'hats', 'magic wand' ), 'product_cat' ) ) : get_template_part( 'woocommerce/content', 'single-product-themes' ); else : get_template_part( 'template-parts/post/content', get_post_format() ); endif;
Các theme wordpress, bạn hãy tùy biến Single Product theo từng Catagory trong Woocommerce tương tự nhé.
Bước 2: Vào thư mục wp-content/themes/zubicloudtheme/woocommerce tạo 1 file có tên: single-product-themes.php
Tại file này, quý khách hãy tùy biến mọi thứ theo cách của bạn. Vậy là xong, chúc bạn thành công
sandyterrace.com
Zhang Xin이 올려다 보았습니다. 오, 천체 지리학자입니다.
Cash Winning Games to Play in Kenya
best online casino games kenya [url=https://levine.co.ke/best-online-games-that-pay-real-money-in-kenya]best online casino games kenya[/url] .
bmipas.com
実用性が高く、具体的なアドバイスが役に立ちました。
Narin ve tatlı, aynı zamanda escort sakarya sakarya arkadaş canlısı ve eğlenceyi seven bir insanım. Her zaman gülümseyen ve çok açık fikirli güzel bir hanımefendiyim. Doğal bir vücudum var, inanılmaz deneyim arayışında iseniz o halde ne arzuladığınızı bana iletebilirsiniz.
Escort Sakarya Bayan Birbirinden güzel kadınlarla alakadar ne ararsanız bulabileceğiniz Bayan arkadaş arama sayfası sizin için 24 saat hizmet sunar.
hello!,I really like your writing so a lot! share we keep up a correspondence extra approximately your post on AOL? I need an expert in this house to unravel my problem. May be that is you! Taking a look ahead to see you.