Support » Plugin: Custom Content Shortcode » Support for Page children

  • Resolved bearhuntdotnet

    (@bearhuntdotnet)


    Eliot,
    First of all, great plug-in; thanks for your work.

    Here is an idea for a new feature, or maybe it’s possible already but I don’t know how to do it.

    It would be useful to be able to get the children of a page, so I could easily create teasers for each of the child pages on the “Fruit” landing page… Something like:

    [loop type="page" parent="fruit"]
    <a href="[content field='url']">[content field="title"]</a><br />
    [content field='excerpt']
    [/loop]

    Thanks and take care,
    Thomas

    https://wordpress.org/plugins/custom-content-shortcode/

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

    (@miyarakira)

    Hi Thomas,

    Thank you for the suggestion – that does sound useful to be able to retrieve child pages. I don’t think this is possible yet, so I’ll try to implement it for the next update.

    I’ll let you know when it’s ready.

    Thread Starter bearhuntdotnet

    (@bearhuntdotnet)

    Eliot,
    It’s very cool how active/responsive you are in regards to responding to requests here. I’m impressed.

    While playing with this some more, I was thinking another feature I would use with the “child pages” concept is the ability to show a snippet of the page based on the “More” tag. Currently I’m trying out “words”, “length” and “excerpt”… but words/length cut off in an unexpected place and excerpt isn’t an available special field for pages (it is in posts).

    Taking the teaser or snippet based on the location of the “more…” tag would be perfect.

    Thanks again!
    Thomas

    Thread Starter bearhuntdotnet

    (@bearhuntdotnet)

    Eliot,
    As I continue working with pages, I realized there is a “Page Attribute” called “Order”. It would be great if I could use that with the “loop” when working with a set of child-pages.

    Thanks,
    Thomas

    Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I made an update to the plugin and included your suggestion. You can now display all children by parent, specified by slug:

    [loop parent="fruit" orderby="menu_order"]
        [content field="title"]
    [/loop]

    Also, for ordering by the number in Page Attribute, you can set orderby=”menu_order”.

    Thread Starter bearhuntdotnet

    (@bearhuntdotnet)

    Elliot,
    Sorry for the delayed reply; this works great!

    Thank you for your great work!

    Take care,
    Thomas

    Plugin Author Eliot Akira

    (@miyarakira)

    Thanks for the nice review!

    I’ll look into the feature to display content up to the “more” tag. That also sounds useful, as an alternative to the excerpt field for posts.

    Hi,

    Why have you chosen to display children of parent by specified by slug?

    Slugs change so isn’t the parent id much more reliable.

    Great plugin!!! It has saved me a lot of work.

    Thanks a lot.

    Please add the feature to display children by parent id. This is the only missing part for my project.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Support for Page children’ is closed to new replies.