U
U
UN_Tony2022-04-19 11:37:36
WordPress
UN_Tony, 2022-04-19 11:37:36

How to make the correct product image in the viber link?

Now if you send a link to a product, it leaves with any random photo, even the one that is not on this page. How to make it so that when sending a link to a product there is a photo of this very product, and not some kind of samovar or moonshine still, which are not even on sale? )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UN_Tony, 2022-04-19
@UN_Tony

solved for item:
nuna insert in head

<?php
 if ( is_product() ) {
    global $post, $product;
    echo '<meta property="og:image" content="'.get_the_post_thumbnail_url( $post->ID, 'shop_thumbnail' ).'">';
 }
 ?>

we are still looking for sections)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question