ĐĂNG TIN
logo
Online:
Visits: 1,688,960,168
Stories: 8,394,590
Profile image
0
0
Tác giả: fcwordpress
Trang tin cá nhân | Bài đã đăng
Lượt xem

Hiện tại:
1h trước: 1
24h trước: 1
Tổng số: 67
Hướng dẫn custom woocommerce – phần 1
Friday, January 8, 2016 8:03
% of readers think this story is Fact. Add your two cents.


  • Tuyên bố theme đã hỗ trợ woocommerce
add_action( 'after_setup_theme', 'woocommerce_support' ); function woocommerce_support() { add_theme_support( 'woocommerce' ); }
  • Copy tất cả file trong folder templates vào folder theme hiện hành và đổi tên thành woocommerce
  • Custom hiển thị thông tin của một sản phẩm

Mở file content-product.php và thay thế toàn bộ code nằm trong thẻ

  • bằng code show thông tin sản phẩm
    • Style hiển thị một row là 4 cột
    .cutom-woocommerce-product-item-title-and-price h2 a { font-weight: normal; font-size: 14px; clear: both; text-align: center; } .cutom-woocommerce-product-item { width: 23.5%; float: left; margin-right: 2%; background: #fff; text-align: center; min-height: 290px; margin-bottom: 40px; } .cutom-woocommerce-product-item:nth-of-type(4n+4) { margin-right: 0; } span.amount { text-decoration: none; } .cutom-woocommerce-product-item-title-and-price ins { text-decoration: none !important; font-weight: 700 !important; color: #F91111 !important; }
    • Còn tiếp(…)

  • Tin nổi bật trong ngày
    Tin mới nhất

    Register

    Newsletter

    Email this story
    If you really want to disable all recommended stories, click on OK button. After that, you will be redirect to your options page.