[Resolved] Hook only in the first page of the pagination?

Home Forums Support [Resolved] Hook only in the first page of the pagination?

Home Forums Support Hook only in the first page of the pagination?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1362751
    Fernando Díaz Gascón

    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

    #1362849
    David
    Staff
    Customer Support

    Hi there,

    this topic explains how to disable a hook on paged content:

    https://generatepress.com/forums/topic/element-hook/#post-1012294

    #1363028
    Fernando Díaz Gascón

    It works perfect! Thank you

    #1363122
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.