[Resolved] Page Hero Element for Parent + Child pages

Home Forums Support [Resolved] Page Hero Element for Parent + Child pages

Home Forums Support Page Hero Element for Parent + Child pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1591111
    jasper

    Hello –

    Just wanted to be sure I have the most current information.

    I would like to use the wonderful Elements feature to display a certain page hero for each department.

    For example:
    Parent: Planning Dept.
    Child: — Permits
    Child: — Zoning
    Child: — Meetings

    — all get a special Hero. Then the Fire Dept. gets their own header, etc.

    Is this possible using the Display Rules without selecting each page individually (we have over 100 pages) or do we use the solution posted here-

    https://generatepress.com/forums/topic/how-to-set-an-element-location-to-child-of-a-parent-page/

    Thank you!
    -Laura

    #1591243
    Leo
    Staff
    Customer Support

    Hi there,

    I believe this is what you are looking for:
    https://generatepress.com/forums/topic/gp-hook-on-certain-child-pages/#post-1056464

    Let me know ๐Ÿ™‚

    #1591336
    jasper

    Thanks! Did this code cause the hero to display on both the parent and the child? That is what I was looking for. This goes into the functions file of the child theme, right?

    #1591424
    Leo
    Staff
    Customer Support

    Yup it should.

    And yes it can be added using one of these methods:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1592623
    jasper

    Thanks! I will be switching a site over in a few weeks and will use this feature. I am finding ways to use the elements all the time. They are great!

    #1592631
    Leo
    Staff
    Customer Support

    Glad to hear ๐Ÿ™‚

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