Hoàng Web

Thiết Kế Website WordPress

  • Kho giao diện
  • Dịch Vụ
    • Thiết kế web giá rẻ
    • Thiết kế website WordPress
    • Hosting Miễn Phí 100GB
    • Tích hợp thanh toán MoMo, ViettelPay, Vietcombank, MB..
    • Tối ưu Google PageSpeed
    • Sửa lỗi nâng cấp website
    • Viết plugin WordPress
    • Code Tool theo yêu cầu
  • Bảng giá
  • Quy trình làm việc
  • Giới thiệu
  • Liên Lạc
Trang chủ » Wordpress » Một số conditional tags trong wordpress woocommerce framework

Một số conditional tags trong wordpress woocommerce framework

Thứ Tư, 10/09/2014 by Hoàng Quách

  • shares
  • Facebook
  • Facebook Messenger
  • Gmail
  • Viber
  • Skype

Các template tags sau đây bạn có thể sẽ cần trong khi phát triển wordpress theme bán hàng với woocommerce.
template tag wordpress - hoangweb.com

Conditional tags – Với Category

//Returns true when viewing a product category archive.
is_product_category();
is_product_category( 'shirts' );		//When the product category page for the ‘shirts’ category is being displayed.
is_product_category( array( 'shirts', 'games' ) );		//When the product category page for the ‘shirts’ or ‘games’ category is being displayed.

Conditional tags – Tags

//Returns true when viewing a product tag archive
is_product_tag()
is_product_tag( 'shirts' );		//When the product tag page for the ‘shirts’ tag is being displayed.
is_product_tag( array( 'shirts', 'games' ) );		//When the product tag page for the ‘shirts’ or ‘games’ tags is being displayed.

Xác định Template Page

//Returns true when on the product archive page (shop).
is_shop()

//Returns true on a single product page. Wrapper for is_singular.
is_product()

//Returns true on the cart page.
is_cart()

//Returns true on the checkout page.
is_checkout()

//Returns true on the customer’s account pages.
is_account_page()

Để nhận được bài viết mới vui lòng đăng ký kênh kiến thức WordPress từ A-Z ở Form bên dưới. Bạn cũng có thể nhận được sự trợ giúp trên Twitter và Facebook

  • shares
  • Facebook
  • Facebook Messenger
  • Gmail
  • Viber
  • Skype

Chuyên mục: Wordpress, Wordpress plugins Tìm kiếm: web bán hàng, Woocommerce

Tôi giúp gì cho bạn?

HOÀNG WEB

Địa chỉ: Tây Sơn, Phường Quang Trung, Quận Đống Đa, Hà Nội

Hotline: 0987 342 124 – 0868 292 303 (8h:00 – 21h:00)

Email: [email protected]

Website: www.hoangweb.com

KẾT NỐI VỚI TÔI

  • Facebook
  • GitHub
  • YouTube

SẢN PHẨM

  • Plugin Thanh Toán Quét Mã QR Code Tự Động
  • WP2Speed – Tối ưu Google Speed
  • 23WebHost – Hosting Miễn Phí 100GB

LIÊN KẾT

  • Có nên thuê thiết kế website giá rẻ?
  • Hướng dẫn thanh toán
  • Chính sách hoàn tiền
  • Trung tâm hỗ trợ

Copyright © 2023 | All rights reserved | HOANG WEB
Mọi hình thức sao chép nội dung trên website này mà chưa được sự đồng ý đều là trái phép.