Support

Account

Home Forums General Issues Page Link used to display children in parent

Helping

Page Link used to display children in parent

  • Hello,

    it would be nice, if you could help me:

    This are my Pages (I call them categories):

    • Women
    • Men

    This are my Landingpages:

    • Highheels
    • Shirt
    • Cap

    A Landingpage has the following fields:
    field-name: h2
    field-name: description

    I have a Page Link Field (field-name: cat; Multi-Select) for my Landingpages, where I am able to select the categories for:

    • Highheels [Women]
    • Shirt [Women; Men]
    • Cap [Women; Men]

    My Question:

    How I am able to display the “Children” (Landingpages) in the right Category with the values of h2 and description?

    This should be the result:
    *Women Page*

    <h2>Highheels</h2>
    <p class="description">Very nice shoes!</p>
    <h2>Shirt</h2>
    <p class="description">In a cool color!</p>
    <h2>Cap</h2>
    <p class="description">Yeah, this is style!</p>

    *Men Page*

    <h2>Shirt</h2>
    <p class="description">In a cool color!</p>
    <h2>Cap</h2>
    <p class="description">Yeah, this is style!</p>

    PS: Please be nice, I am a Photoshop-Guy 😛

    Thanks 🙂

  • Hi @maceffy13

    I think it’s better if you use a custom taxonomy instead. That way, you can set the categories for the landing pages. If you don’t know how to create it programmatically, you can try Custom Post Type UI plugin instead.

    But if you still want to use the page link field instead, kindly check this guide: https://www.advancedcustomfields.com/resources/querying-relationship-fields/. That guide is talking about relationship field, but the logic should be similar.

    I hope this helps 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.