You can use shortcode for display child pages from the page.
Some Feture
- This plugin will add shortcode
[child_pages]
for display child pages. - You can customize default HTML template & Stylesheet from your plugin.
- This plugin will be able to “excerpt” to the pages.
Excerpt support on the Page
Shortcode sample
Dsiplaying child pages from the Page
You can customize html output and stylesheet
filter hook for template
<?php add_filter("child-pages-shortcode-template", "my_template"); function my_template($template) { return '<div class="%class%"><a href="%post_url%">%post_thumb%</a></div>'; } ?>
- %post_id% – ID of the Page
- %width% – Width of block for single page
- %post_url% – Page permalink
- %post_thumb% – <img> for Post thubmail
- %post_title% – Page title
- %post_excerpt% – Page excerpt
filter hook for stylesheet
<?php add_filter("child-pages-shortcode-stylesheet", "my_style"); function my_style($url) { return 'http://example.com/path/to/style.css'; } ?>
Default source of template
<div id="child_page-%post_id%" class="child_page" style="width:%width%;"> <div class="child_page-container"> <div class="post_thumb"><a href="%post_url%">%post_thumb%</a></div> <div class="post_content"> <h4><a href="%post_url%">%post_title%</a></h4> <div class="post_excerpt">%post_excerpt%</div> </div> </div> </div>
Change log
Donate
It is hard to continue development and support for WordPress plugins without contributions from users like you.
How can I change the […] to Learn More and a link to the page?
Is it possible to add pagination? I’ve more than 30 child pages and iI’d like to show only 10 per page.
Sorry, pagination is not supported.
Hello Takayuki,
Is it possible to exclude child-pages from the output based on ID?
If not, can you add this as a feature request.
Thanks!
Hey,
I have an issue with wordpress 3.5.1 where the “read more” does not link to the child post. It links to the parent. I have tried to edit the plugin to work but have not been able to get it working.
same problem here
Hey,
On wordpress 3.5.1 the “Continue Reading” does not like to the child theme but instead is linked to the parent page. I have tried to change this but nothing worked. Hope for an easy fix soon.
It would be nice if the title were centered under the thumbnail instead of being left aligned.
Edit the css file.
Add text-align:center; to .child_pages .post_thumb
.child_pages .post_thumb
{
text-align:center;
overflow:hidden;
background-image:url(img/camera.png);
background-position:center center;
background-repeat:no-repeat;
}
And it should look like this: http://kpopmp3.net/kpop-artists/
Hi Daniel.
This plugin have a hook for customize css style.
You can change stylesheet file like below.
<?php
add_filter("child-pages-shortcode-stylesheet", "my_style");
function my_style($url) {
return 'http://example.com/path/to/style.css;
}
Thanks! 🙂
This plug in is perfect for what I wanted to show on the parent page. Thank you for your hard work!
How do I change the color of the child page name “A Pink” (http://kpopmp3.net/wp-content/uploads/2013/03/child_page.png).
Also, instead of having an excerpt can I show a “read more” button instead?
This plug in is perfect for what I wanted to show on the parent page. Thank you for your hard work!
How do I change the color of the child page name “A Pink” (http://kpopmp3.net/wp-content/uploads/2013/03/child_page.png).
Also, instead of having an excerpt can I show a “read more” button instead?
Is it possible to turn the excerpt off? I’d prefer to just have the image and title of the pages.
Is it possible to remove the excerpts? I’m looking to just have the image and a title. Any help would be appreciated! 🙂
For me it helped to delete
$html .= ‘%post_excerpt%’;
in the child-pages-shortcode.php file.
Hi, I really like this plugin! I have a request, just in case you’d be willing to add something simple:
Would it be possible to add an anchor to each child page display box? That way on the page showing the child pages it will be easy to link within that page.
Something like this:
private function get_template()
{
$html = “\n”;
$html .= ‘‘;
$html .= ”;
…….
…….
…….
}
How do I display the image and content side by side? Please help
You need edit CSS on your theme.
But I can’t help for editing CSS.
Thanks. I managed to do it myself.
There’s another issue. The ‘Continue reading’ link is pointing to the parent page itself instead of pointing to the corresponding child. What do I do?
The “READ MORE” or “Continue Reading” does not produce the correct URL. It leads back to the parent so it does not work at all.
No pagination. So if you have a lot of child pages to show, figure that out on your own…
Child pages are displaying the featured image but there is no clear way to call for a specific image size.
Also, the plugin is not easily styled especially if you do not understand “Args”, “Hooks” and all the terminology that WordPress is associated with.
It’s a shame. I thought this would be an easy fix for what I need. Would have even donated to the developer. 😦
Spent time styling this plugin to work, but then discovered the bug of Read More linking to parent page, not to the child page. I agree to donating if the developer were to fix these known issues.
OH! I will fix! Thanks!
Is it possible to order the childpages by asc?
I would be interested in knowing that too.
Thanks in advance!
How did you order at all?
My child pages are ordered by created.
I would like to have them ordered alphabetic by document title
I order my child pages by using the WordPress “Page Attributes” order override field. Since I am adding new pages all the time and like to keep them ordered by child page title name, I leave many spots in between each number to allow for new page additions (example i set my first page to 0, second page to 10, third page to 20, and that leaves room to add pages 1 to 9, 11 to 19, ect). It is a pain if you have a lot of child pages but better than ordering by page creation date.
@Daniel A:
I hat hoped that this solution not was necessary… But for now I will use the ASCII numbers as sorting key.
@Daniel A
Thanx Daniel! You’re right this ist better than ordering by page creation date. 🙂
What about inserting anchor points? For instance, I would like to create a list of the items at the top of the page. The items in the list could link to the child pages by using some kind of anchor point system. Example:
The list at the top of may page would look like this:
1. This would be some text to link to child page apple.
2. This would be some text to link to child page orange.
3. This would be some text to link to child page banana.
The list would use html code to call to the anchor points like this:
1. This would be some text to link to child page apple.
2. This would be some text to link to child page orange.
3. This would be some text to link to child page banana.
Could we insert something in the PHP to create generate the anchor points in consecutive order? So calling to the child content to display would also cause an anchor point to be generated. Something like this:
Thank you for any feedback or pointers. I wouldn’t mind doing the work if I had a little help.
Sorry. I guess the html I put into my comment should have been enclosed in a tag so that WordPress didn’t generate it but just display the code.
{The list would use html code to call to the anchor points like this:
1.
This would be some text to link to child page apple.
2.
This would be some text to link to child page orange.
3.
This would be some text to link to child page banana.
Could we insert something in the PHP to create generate the anchor points in consecutive order? So calling to the child content to display would also cause an anchor point to be generated. Something like this:
Thank you for any feedback or pointers. I wouldn’t mind doing the work if I had a little help.
It is still rendering the code instead of displaying the HTML. I enclosed it in
tags ('code tags')..... :( I am new to this and I'm not liking how difficult this is
List like this:
1.
This would be some text to link to child page apple.
2.
This would be some text to link to child page orange.
3.
This would be some text to link to child page banana.
Anchor like this:
$%^&! I give UP!!!!!
Umm, Anchor link is not supported.
Thanks Takayuki. But I wrote it into the PHP. I figured it out. All I did was add:
{
$html .= '';
}
under line 149 in the get_template function. This adds the anchor point. Then all I had to do was call to it in the HTML. I did this using an image map in this example:
http://s119736768.onlinehome.us/applications/oil-gas
I’m not sure how to write the line of code on my comment as it keeps getting removed. What do I have to add to my comment in order to show you the code? I tried to put the word “code” inside before and after the code but that doesn’t stop it from removing code.
$html .= '';
was added under line 149 of the child-pages-shortcode php file.
Anyone else running into issues with clicking “edit” on a page? Especially when it’s in the middle – like Subject Page -> This Child Page -> More Child Page… The “This Child Page” edit button keeps sending me to “More Child Page” instead. I have no idea why. Thoughts? And it’s only on a few places, totally random. I would pay for this plugin as well!
Ever since the latest update all of my thumbnails are coming up at their original aspect ratio, instead of the 1:1 the plugin used to modify them to. I tried to remove the featured image and replace it with one that I had set to a 1:1 aspect ratio, but now they are not showing up at -all-. Anyone else having this problem?
How do I set in alphabetical order?
[child_pages width=”33%” size=”thumbnail” ]
Hi, how do I put the pages into alphabetical order
[child_pages width=”33%” size=”thumbnail” ]
sort alphabetically instead of by id? Possible?
Its not supported yet but you can order by the wp attributes:
https://wpist.me/wp/child-pages-shortcode/#comment-682