I
I
Ilya Derevyannykh2021-10-23 20:59:58
WooCommerce
Ilya Derevyannykh, 2021-10-23 20:59:58

How to display only the first three attributes?

Specifications are displayed on the site in the catalog.
But this is done with code like this

<table class="short_haracter">
  <tbody>
    <tr>
      <td>Высота</td>
      <td><?php global $product;echo $product->get_attribute('vysota-sm'); ?> </td>
    </tr>
    
    <tr>
      <td>Жесткость</td>
      <td><?php global $product;echo $product->get_attribute('zhestkost'); ?> </td>
    </tr>
    
    <tr>
      <td>Мах нагрузка на спальное место</td>
      <td><?php global $product;echo $product->get_attribute('mah-nagruzka-na-spalnoe-mes'); ?> </td>
    </tr>
  </tbody>
</table>


How can I display the first three categories so that any attributes are displayed?

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