Support » Plugin: Menu Item Visibility Control » Visibility Control for WooCommerce Products

  • Hi there, thank you for the plugin, it’s great! Question: I want to hide (or show) specific menu items for product pages. I’ve tried to create two categories and hide those accordingly, but to no avail.

    Basically, my menu now reads:

    My Aleppo | My Aleppo Shop | My Radius | My Radius Shop

    For the product category “Radius”, I want to hide My Aleppo | My Aleppo Shop, so I have put ! is_product_category( ‘Radius’ ) in the control panel, but to no avail.

    What am I doing wrong?

    • This topic was modified 2 years, 11 months ago by wurgi.
    • This topic was modified 2 years, 11 months ago by wurgi.
Viewing 1 replies (of 1 total)
  • Plugin Author shazdeh

    (@shazdeh)

    is_product_category checks for product category archive pages, not to be confused with single product pages that are assigned to that category. If you want the latter, you could try something like:

    
    is_singular( 'product' ) && has_term( 'radius', 'product_cat' )
    

    Now that checks if visitor is on a product page that has the “radius” product category.

Viewing 1 replies (of 1 total)
  • The topic ‘Visibility Control for WooCommerce Products’ is closed to new replies.