WordPress Plugin: Childpages

WordPress Plugin: Childpage Thumbnail Image Generator

This is a plugin I wrote which can find all of the child pages of the specified parent, or if used on a parent page looks for children automatically.

If there is an image, it will load a thumbnail. It actually does quite a bit of checking, if no childpages exist you’ll get a message, if no images exist on the child pages it uses the title instead. If your page has a Featured Image, it will use that first, before checking for image attachments to the page.

Check out my home page and the motion main page to see it in action.

Download Plugin: bryans_childpages v 1.3 

Instructions

To use, simply download and install the folder into your plugins folder of WordPress. Then in a page which has children, type in[gallery_childpages].   Links to the child pages should show up. If the pages have images, they will show up as a thumbnail. There are many options to sort, display by id, etc. to get this to work exactly how you want.

Example Shortcode

Here is the shortcode that I am using to create my motion page:

[gallery_childpages height="160" size="medium" text_margin="130px 0 0 0" pagetitle="true"]

Here is the shortcode that I am using to create my home page:

[gallery_childpages height="70" size="medium" width="113" id="1290" exclude="2110" pagetitle="1" text_margin="0"]

anges in version 1.3 is I have created a css stylesheet as part of the plugin to control common things like margins. This is helpful if you are using a responsive web design.

13 Replies to “WordPress Plugin: Childpages”

  1. Hi Bryan, thanks for the plugin. I needed pagination support with your plugin, so I made some additions in the code: http://pastebin.com/mddcJmRF

    Usage:

    Note: I am using post name type permalink with custom structure /%postname%/%page%

    You can modify the plugin it to make it more generic with custom selector and class names.

    Please incorporate the pagination feature in your plugin’s next update (perhaps with AJAX!). 8-)

  2. Hi Bryan, thanks for the plugin. I needed pagination support with your plugin, so I made some additions in the code: http://pastebin.com/mddcJmRF

    Usage:

    Note: I am using post name type permalink with custom structure /%postname%/%page%

    You can modify the plugin it to make it more generic with custom selector and class names.

    Please incorporate the pagination feature in your plugin’s next update (perhaps with AJAX!). 8-)

  3. Hi Bryan, thanks for the plugin. I needed pagination support with your plugin, so I made some additions in the code: http://pastebin.com/mddcJmRF

    Usage:


    [gallery_childpages number='-1' height='220' width='295' size='medium' style='armthumbs' include='' pagetitle='1' selector='H2' showimages='0' showimages='true' exclude='1,33,22' posts_per_page = '6' page_number='" . get_query_var('page') . "']

    Note: I am using post name type permalink with custom structure /%postname%/%page%

    You can modify the plugin it to make it more generic with custom selector and class names.

    Please incorporate the pagination feature in your plugin’s next update (perhaps with AJAX!). 8-)

  4. Hi Bryan, congrats for the plugin. Works perfectly but with two big problems for me. The first on is that I can’t control thumbs order because pages creation dates doesn’t work and when I use id’s I always have the message “here are no child pages for post id # ” but the posts are already there. The second one is that I can’t create pages within pages in a second level (or I don’t know how).Hi Bryan, Congrats for the plugin. Works perfectly but with two big problems for me. Fistable is that I cant’t thumbs order in a specific way (something like can apply the creation date of the page).

    Thanks in advance.

    Regards.

  5. Hi, Bryan. This really came in handy to display an index of photo albums on a non profit site I’m working on. I just wish the styles weren’t embedded and there were more style hooks. Here’s the result with your plugin:
    http://www.worthamparkfriends.org/gallery/

    Thanks again!

  6. Hi, thank you for the great plugin! it really helped me (i have tried a lot plugins and waste a wagon of time).
    Pls advise, how to make order like in menu order?
    is it real?

    thank you in advance

  7. I’ve updated the plugin to include the stylesheet as part of the plugin. This might help people get started with styling a little easier.

    For sorting issues, look at the source code and you’ll see how it works, along with a complete list of shortcode parameters that can be passed to the plugin. ‘orderby’ is the one you will want to look at. It will need to follow the standard WordPress codex in terms of what is acceptable, so take a look at the codes.

  8. How, this plugin is so great, thanks a lot for coding it Bryan! Just what I needed and spent a lot of time trying to find it. Just Perfect!

  9. Only one slight problem I have. How do I add white space between two images? I have tried for a long time to edit to margins and everything else, but I can’t get it to work. Thanks again for a wonderful plugin!
    http://luminouspoker.com/

  10. You can specify CSS margins in the shortcode – [gallery_childpages height=”70″ size=”medium” width=”113″ id=”1278″ margin=”10px” pagetitle=”1″ text_margin=”0″] That code simply puts 10px on all sides, you can use the CSS standard for Top/Right/Bottom/Left – margin = “0 10px 0 20px”

  11. I already tried that a bunch of times. I guess it is my pictures that hinders it then:(. Thanks anyways.

  12. Looks like I got rid of the margin option in my latest version, and instead I’m using a CSS sheet that is now included with the plug-in. I think I did this so that my margins could be responsive, since my theme is always based on the latest WP default theme. I’ve updated the .zip on this page with the latest version.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.