-
Notifications
You must be signed in to change notification settings - Fork 0
/
wc-custom.php
69 lines (50 loc) · 2.07 KB
/
wc-custom.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
//add action for title product
remove_action('woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10);
add_action('woocommerce_shop_loop_item_title', function () {
echo "
<p>" . get_the_title() . "
</p>
";
});
remove_action('woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10);
remove_action('woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
add_action('woocommerce_before_shop_loop_item_title', function () {
?>
<div class="categorizing_product_custom_info">
<div class="categorizing_product_custom_img">
<?php echo woocommerce_get_product_thumbnail(); ?>
</div>
<?php
});
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5);
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
add_action('woocommerce_after_shop_loop_item_title', function () {
global $post, $product;
?>
</div>
<div class="categorizing_product_custom_price">
<span><?php wc_get_template('loop/price.php')?></span>
</div>
<?php if ($product->is_on_sale()): ?>
<span class="off">30%</span>;
<?php else: ?>
<div class="categorizing_product_custom_sub_info">
<span class="real_price"> </span>
<span class="" style="
display: block;
height: 22px;
"></span>
</div>
<?php endif; ?>
<?php
}, 10);
remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30);
remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
add_action('woocommerce_before_main_content', function () {
?>
<?php
}, 20);
remove_action('woocommerce_after_shop_loop', 'woocommerce_pagination', 10);
remove_action('woocommerce_before_shop_loop', 'woocommerce_output_all_notices', 10);