B
B
balaknegor2018-02-05 19:19:55
Web development
balaknegor, 2018-02-05 19:19:55

How to add an additional field with an image to the product card?

Hi friends!
Please help me get more information. about the product.
I use TheGem theme,
see picture
Comparison is not necessary.
5a78841385676374134013.png
PS I'm new to WordPress, don't kick too hard, poke more!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
balaknegor, 2018-02-06
@balaknegor

Helped solve the problem - comrade!
Here is the solution:
create attributes
in the content-product.php file (in wookomers)

<? if(!empty($product->get_attribute( 'pa_speed' )))
    {
        ?><div class="attribute speed">
          <?=$product->get_attribute( 'pa_speed' ) ?>
        </div><?
        } 
        if(!empty($product->get_attribute( 'pa_dalhod' )))
        {
        ?>
        <div class="attribute dalhod">
          <?=$product->get_attribute( 'pa_dalhod' ) ?>
        </div><?
        } 
        if(!empty($product->get_attribute( 'pa_diametr' )))
        {
        ?><div class="attribute diametr">
          <?=$product->get_attribute( 'pa_diametr' ) ?>
        </div>
        <?
    }
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question