I'm developing a Woocommerce shop and need to display views conditionally, depending on the parent term of current product category archive page.
The shop has two main categories, Woman and Men.
For example, I need to show a view only if you are on woman's category archive page (this is ok using [wpv-taxonomy-archive]' eq 'Woman') OR if the current archive page parent is Woman. The same with man parent category. Also need to be hable to use the same function to check for future parent categories.
I know I have to use something like this [wpv-conditional if="( '[wpv-taxonomy-archive]' eq 'Woman' ) OR ( archive_term_parent_category() eq 'Woman' )"][/wpv-conditional] based on this post https://toolset.com/forums/topic/how-to-set-condition-on-filter-controls/ but need your help with the function to get current archive parent category, please.
You can use the shortcode like this [wp_parent_archive_title taxonomy="taxonomy-slug" term="term-slug"] where you will replace the taxonomy slug with the slug of your taxonomy and the term-slug with the slug of your term.
So in your case you can do this [wp_parent_archive_title taxonomy="taxonomy-slug" term="[wpv-taxonomy-slug]"]
"Finally just use replace taxonomy-slug with the slug of the taxonomy created in Types." The taxonomy is created by default by Woocommerce plugin I didn't create it with Types, just in case this is part of the problem.