Product Category Page in Full Width

I will explain it to you without code at the moment, but in things need to be done:

  • Before you render your category html, check its position (depth) from its current category upwards to the parent category.
  • If the level is 2, then add the style you want to post_class (post_class($array)), otherwise do not add.

Check this answer for getting the ancestors of a category:

Get the the top-level parent of a custom taxonomy term

Check this to see more about post_class():

https://codex.wordpress.org/Function_Reference/post_class