[Support request] GP Premium Element Hooks – Select multiple hooks?

Home Forums Support [Support request] GP Premium Element Hooks – Select multiple hooks?

Home Forums Support GP Premium Element Hooks – Select multiple hooks?

  • This topic has 1 reply, 2 voices, and was last updated 4 years ago by Leo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1246952
    Jon

    Hi, I was wondering if it was possible to select multiple hooks at all when using elements? I’m trying to get something to display at both the top and bottom of posts. It would be less clutter if I could just select more than one hook on the element using both before_content and after_content.

    I’m able to select more than one location in the display rules tab, though there doesn’t appear to be the same option to select more than one hook. Is there a technical reason for this, or has it just not been requested before?

    Obviously I can just create a duplicate GP element for the second hook but I’d rather avoid that if possible as I then have to change both if I want to add or remove locations.

    If it can’t be done then fair enough, if it’s something that can be added then please consider this a feature request! If there’s a quick snippet fix in the mean time that would also be great.

    Thanks, Jon

    #1247081
    Leo
    Staff
    Customer Support

    Hi Jon,

    Unfortunately I believe what you are asking is simply not possible.

    The original hook snippet looks like this:
    https://docs.generatepress.com/article/using-hooks/

    And it only allows 1 hook at the time.

    Hope this explanation helps 🙂

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