How to delete show records with a tag in a specific category?

Is the website
Task: to remove the display of "RELATED PRODUCTS" section with children's products.
As you can see here and here 2, see "RELATED PRODUCTS".
Only if "here" is right and "here 2" - no. Since there appear baby products.

The output of "RELATED PRODUCTS" is this code (the output of goods goes through the tags(labels))

How and where to exclude the display of the TAG 320, for headings with CHILDREN's PRODUCTS.
September 18th 19 at 23:51
2 answers
September 18th 19 at 23:53
It is necessary to define the category "Baby items" to find it's id or slug in the template of a single item to check
if (in_category($cat_id_detskie_tovary, $post->ID)) {
 // these baby items, then do what is necessary for them
} else {
 // this is not children's products, and then do what is necessary for them
 // namely, as before we derive the block with related products
thanks, that's seems to have what you need. try - Ruby.Heller commented on September 18th 19 at 23:56
September 18th 19 at 23:55
if($post->ID == 320) {
 echo "something";
} else {
doesn't that mean that, if a record has id 320, displays one or there something else.?
I need to do a PHP file, it would be possible to eliminate the TAG 320, for the appropriate category - Ruby.Heller commented on September 18th 19 at 23:58

Find more questions by tags WordPressHTMLPHP