C
C
chuser2017-02-18 18:51:39
WordPress
chuser, 2017-02-18 18:51:39

How to change woocommerce product list html code?

Greetings.
I create an online store on wordpress + woocommerce. Developed its own unique design. Based on this, the standard product list template and the product card template are not suitable. I know how to change the order of elements and how to apply my styles to them. I know about the content-product.php file. In it, you can only change the wrapper of the cycle that displays a list of products. But, in my case, this is not enough. We need changes directly to the html code of each product in the list.
Woocommerce displays a list of products with its html code:

<div class="first post-918 product type-product status-publish has-post-thumbnail  instock taxable shipping-taxable purchasable product-type-simple">
      <img width="300" height="300" src="http://tehnocomf23.tmweb.ru/wp-content/uploads/home_bamboo-knives-300x300.png" class="attachment-shop_catalog size-shop_catalog wp-post-image" alt="home_bamboo-knives" title="home_bamboo-knives" srcset="http://tehnocomf23.tmweb.ru/wp-content/uploads/home_bamboo-knives-300x300.png 300w, http://tehnocomf23.tmweb.ru/wp-content/uploads/home_bamboo-knives-180x180.png 180w" sizes="(max-width: 300px) 100vw, 300px"><h3>Жарочная панель «FAST COOK»</h3>

  <span class="price"><span class="woocommerce-Price-amount amount">2,400.00<span class="woocommerce-Price-currencySymbol"></span></span></span>
<a rel="nofollow" href="/?add-to-cart=918" data-quantity="1" data-product_id="918" data-product_sku="" class="button product_type_simple add_to_cart_button ajax_add_to_cart">Добавить в корзину</a>
    </div>

But I need to radically change this html code, add my own tags, make it adaptive, etc.
Tell me how can this be done?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question