Xóa bỏ /category/ và slug category cha khỏi đường dẫ..
Category : Akasa Code WP
the_post_thumbnail( 'thumbnail' ); Cấu hình tỉ lệ ảnh đại diện: Cài đặt => Thư viện (tiếng anh không nhớ lắm ^^) Bulild lại ảnh đại diện, chúng ta sử dụng 1 trong 2 plugin sau: AJAX Thumbnail Rebuild Force Regenerate Thumbnails Tham khảo thêm lấy ảnh đại diện: //Default WordPress the_post_thumbnail( 'thumbnail' ); // Thumbnail (150 x 150 hard ..
Hàm này lấy chuẩn ảnh woocommerce thumbnail khi sản phẩm hiển thị trên trang chủ, danh mục sản phẩm, wiget….. the_post_thumbnail( 'shop_catalog' ); Cấu hình tỉ lệ ảnh đại diện sản phẩm: Giao diện => Tùy biến => Woocommerce => Ảnh sản phẩm Tham khảo thêm lấy ảnh đại diện: 1 2 3 4 5 6 ..
Xóa bỏ product-category và toàn bộ slug của danh mục cha khỏi đường dẫn của Woocommerce Tham khảo bài viết: https://levantoan.com/xoa-bo-product-category-va-toan-bo-slug-cua-danh-muc-cha-khoi-duong-dan-cua-woocommerce/ https://levantoan.com/huong-dan-xoa-product-product_cat-trong-duong-dan-cua-woocommerce/ http://support.vietmoz.info/bo-tien-to-san-pham-va-danh-muc-tren-url-cua-woocommerce Mặc định chúng ta có Danh mục sản phẩm: http://domain.com/product-category/may-tinh Danh mục con cấp 1: http://domain.com/product-category/may-tinh/may-tinh-de-ban Danh mục con cấp 2: http://domain.com/product-category/may-tinh/may-tinh-de-ban/may-tinh-dell Sau khi áp dụng đoạn code này chúng ta có: ..
Bộ theme Basic đầy đủ tính năng cho a e. Cài sẵn bộ ACF Pro bản mới nhất tại thời điểm này Tích hợp đa ngôn ngữ Tích hợp đa ngôn ngữ với các trang giỏ hàng , thanh toán , tài khoản của tôi Css sẵn các trang giỏ hàng , thanh toán , ..
Code: <?php if ( is_product_category() ){ global $wp_query; $cat = $wp_query->get_queried_object(); $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, ‘thumbnail_id’, true ); $image = wp_get_attachment_url( $thumbnail_id ); echo “<img src='{$image}’ alt=” />..
/** * Create a taxonomy * * @uses Inserts new taxonomy object into the list * @uses Adds query vars * * @param string Name of taxonomy object * @param array|string Name of the object type for the taxonomy object. * @param array|string Taxonomy arguments * @return null|WP_Error WP_Error if errors, otherwise null. */ function ..
/** * Registers a new post type * @uses $wp_post_types Inserts new post type object into the list * * @param string Post type key, must not exceed 20 characters * @param array|string See optional args description above. * @return object|WP_Error the registered post type object, or an error object */ function prefix_register_name() { $labels ..
$all_tags = get_tags(); $tag_id = array(); foreach( $all_tags as $tag ) { $tag_id[] = $tag->term_id; } $args = array( ‘numberposts’ => 5, ‘tag__in’ => $tag_id ); $posts = get_post..
add_filter( ‘woocommerce_product_tabs’, ‘flwoo_new_product_tab’ ); function flwoo_new_product_tab( $tabs ) { $tabs[‘description’][‘title’] = ‘Thông tin’; $tabs[‘tt_tab’] = array( ‘title’ => __( ‘Hướng dẫn thanh toán’, ‘woocommerce’ ), ‘priority’ => 20, ‘callback’ => ‘thanhtoan_tab_content’ ); $tabs[‘ctdt_tab’] = array( ‘title’ => __( ‘Chính sách điều kiện’, ‘woocommerce’ ), ‘priority’ => 21, ‘callback’ => ‘ctdt_tab_content’ ); return $tabs; } function ..
Phản hồi