Archived topic
Hook only in the first page of the pagination?
3 replies · Started by Fernando Díaz Gascón on July 14, 2020
Hello,
I have configured a hook in my woocommerce web. This shows the categories of the products, and after, the products: https://tiendascodo.com/categoria-producto/bisuteria/
The hook is in "woocommerce_before_shop_loop" and the rules to be shown are in a Category Archive Product called "Bisuteria". In that page there are multiple products, so there is pagination.
I would like that once you press the next page in the pagination, not to show again the hook, in order to see directly the products, not again the categories. Some way to do that?
The idea is to find a way to introduce a hook only in the first page of the archive pages.
Thank you in advance
Hi there,
this topic explains how to disable a hook on paged content:
https://generatepress.com/forums/topic/element-hook/#post-1012294
It works perfect! Thank you
Glad to hear that