How to display list of tags in the product page in woocommerce?

Good day! Tell me, please, went to website, re-fabricated is not one of the standard insights of different information. For example, in the product code looks like this:

<div class="productinfo">
 <h1><?php the_title();?></h1>
 <span class="articulproduct">article <?php echo $product->get_sku(); ?></span> 
 <span class="productprice"><?php echo $product->get_price_html(); ?></span>
 <a rel="nofollow" href="<?php echo $product->add_to_cart_url(); ?>" data-quantity="1" data-product_id="<?php echo $product->get_id(); ?>" data-product_sku="<?php echo $product->get_sku(); ?>" class="addtocart">To cart</a>
</div>


Background: I need to display on the item card, the type of sentence: "out of stock", "custom", etc. there is Nothing more intelligent than to do it through a label, I figured it out. Tried their fields to add, but nothing appears still.

The problem is that the label is also not displayed. I tried between the Article and the Price to add the code that you found in the Internet. Either the website crashes with a 500 error or nothing changes.

Added to functions.php code and inserted the shortcode in the same place. Is also not working.

Now I do not know how I in the right place to put these labels?
March 23rd 20 at 18:53
1 answer
March 23rd 20 at 18:55
For example, in the product code looks like this:

Normal code, what you in it confused? The variable $product contains a Product object with all the properties and methods. This is an advanced analogue of the Post object, only WooCommerce.

I need to display on the item card, the type of sentence: "out of stock", "custom", etc. there is Nothing more intelligent than to do it through a label, I figured it out.

Why? WooCommerce have is control product availability (Stock Management, do not know how it correctly in Russian version). And all this information will then be available in $product.

The problem is that the label is also not displayed. I tried between the Article and the Price to add the code that you found in the Internet. Either the website crashes with a 500 error or nothing changes.

Added to functions.php code and inserted the shortcode in the same place. Is also not working.

Apparently you're not a developer, so it is so difficult. But you absolutely can not dig there. We advise to contact the expert on WooCommerce, it will solve this problem quickly and efficiently. Educate you on the Toaster oven working with the WooCommerce platform, the basics of OOP is not an option.

Find more questions by tags WooCommerceWordPress