• Resolved kyperstudios

    (@kyperstudios)


    Hi there,

    Sorry that I did not come up with a proper topic title that can summarize my quesstion.

    I was helping my client to add a product carousel on top of the product catalog (or I always call it as product category page). I have done it with the woocommerce_before_main_content hook and it works as shown in the image below:
    https://ibb.co/mcdFxHh

    However, this product carousel is also showing in the single product page like the image shown below:
    https://ibb.co/tcVGyvk

    My client would like that it only show in product category page. Is there anyway that I can untie the hook from single product page or any other way for me to just add the carousel on top of the product category page only?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shohan Hossain Nabil – a11n

    (@sohanhossain)

    Hello @kyperstudios,

    You can try using if( is_shop() ) : check condition inside your code to make sure the changes only applied to the shop page. You can find more details here.

    Alternatively, you can use the woocommerce_before_shop_loop hook instead of the woocommerce_before_main_content hook.

    Hopefully, this sets you in the right direction.

    If you do require more help with the actual coding, we’d recommend hiring a developer or one of the customization experts listed at?https://woocommerce.com/customizations/.

    Cheers.

    Plugin Support Shohan Hossain Nabil – a11n

    (@sohanhossain)

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here when you are ready to continue.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to untie woocommerce_before_main_content hook from single product page’ is closed to new replies.