• Resolved wagonerdesign

    (@wagonerdesign)


    Are we able to tell a loop to query current post and display direct children? I’d also like to do the other way, query parent of current.

    I seems that nobody has built a block that is meant to be used in CPT templates yet.

Viewing 1 replies (of 1 total)
  • Plugin Author Tangible

    (@tangibleinc)

    Hello! Yes, it is possible to loop direct children of the current post, or query the parent post.

    The post loop has a field called parent, which can used like this:

    <Loop field=parent>
      <Field title />
    </Loop>
    

    Similarly, there’s a field called children.

    
    <ul>
      <Loop field=children>
        <li><Field title /></li>
      </Loop>
    </ul>
    

    These and other fields are documented here: https://loop.tangible.one/tags/loop/post

    Please visit our dicussion forum if you have any questions.

    • This reply was modified 2 years, 10 months ago by Tangible.
Viewing 1 replies (of 1 total)
  • The topic ‘Relationship Queries’ is closed to new replies.