Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    I tested this, and it’s working on my end. It shows child pages of the current page:

    [loop parent="this"]
      [field title]
    [/loop]

    I wonder what could be different.. That’s interesting that you’re getting a blank output, instead of all pages. Do you have the code on a page which has child pages?

    As a test, could you compare the results of this:

    This page: [field id]

    ..and this one, where “page-name” is the current page name.

    [loop name="page-name"]
      This page: [field id]
    [/loop]

    The IDs should be the same.

    Thread Starter danfascia

    (@danfascia)

    Eliot – I’m sure it’s me being dumb.

    I’m already running this on a child page so what I really need to access is the other siblings for my list (side menu).

    Is there a way that I can specify:

    [loop parent=”parent”]

    [/loop]

    I hope you get what I am trying to do with your wonderful plugin, essentially to create sub-navigation using child pages.

    Plugin Author Eliot Akira

    (@miyarakira)

    Ah, I see, you need sibling posts which share the same parent as current post. That feature didn’t exist, so I added it in the latest update.

    [loop parent="same"]

    If you’d also like to exclude the current post:

    [loop parent="same" exclude="this"]

    I hope that’s not confusing with parent=”this” (children) and parent=”same” (siblings), but I think it makes sense.

    Also, it’s probably faster performance if you specify the post type:

    [loop type="page" parent="same" exclude="this"]
    Thread Starter danfascia

    (@danfascia)

    Thanks Eliot,

    What a fantastic responsive developer you are! I think that really adds a useful functionality to the plugin since now we can use it in a widget for complete submenu navigation rather than needing an extra sidebar widget.

    Working with your plugin is always so much cleaner for control over HTML and CSS output too.

    Thank You!

    Plugin Author Eliot Akira

    (@miyarakira)

    Great, I’m glad that worked. It was pretty quick to implement, and it looks like a useful feature. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘parent="this"’ is closed to new replies.