How to display the NEW label if the record specified a section New?

The site has a catalog of products using the standard functionality of WordPress a - record. On certain positions you must apply the NEW label over the main picture. How to implement it? Must already have a solution? Thanks in advance!
June 14th 19 at 18:20
2 answers
June 14th 19 at 18:22
Solution
Good day!

In the pattern cycle of the products for each product must be check if ( is_product_category( 'urlcategory' ) ). If the condition displays the picture.

The algorithm is. But implementation is most often individual.
if ( is_product_category( 'urlcategory' ) )

So You check that you are on the category page is "New", but not that the product is tied to the category of "Novelty".

Alternatively, you can use the has_term. - alexandrea_Vandervo commented on June 14th 19 at 18:25
June 14th 19 at 18:24

Find more questions by tags WordPress