This plugin dynamically generates html paragraphs with excerpts from child pages. Put
[excerpts-from-children] on any page
and it will insert the excerpts from its child pages.
In the subpages you want to extract the excerpts from, define the end of the excerpt by putting
<!--excerpt-end--> in the text.
Use the custom field key “excerpts-from-children-thumb” with the value of an uploaded image ID to output thumbnail images for your excerpts. Add this custom field to your child page, and make sure you crop or resize it the way you want it before you upload.
The generated output
The structure of a generated excerpt looks like this:
<img src=”/link/to/image” title=”Title of page thumnail” />
<h3>Title from the child page</h3>
<p>Excerpt from the child page</p>
<p class=”read-more”><a href=”/link/to/page”>Read more »</a></p>
By using the CSS class “excerpts-from-children” you can style your excerpts. To get the image ID needed for the thumbnail, view the thumbnail in the admin interface and check “attachment_id=” in the URL query string. Note that the images doesn’t use any scaling applied by WordPress, so crop/resize them to the exact size you want for your excerpt!
- Activate the plugin through the ‘Plugins’ menu in WordPress
[excerpts-from-children]in the text of the page you want to use to display the excerpts (the parent page)
<!--excerpt-end-->in the text area of the child pages, from which you want to extract the excerpt
- To add a thumbnail, add a custom field to your child page. Enter “excerpts-from-children-thumb” as key, and an image ID as value.
Contributors & Developers
“Excerpts from children” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- NEW Added basic support for thumbnails in excerpts.
- FIX ‘read more’ links so that they link from the domain root
- FIX ordering of child pages so that order field of pages can be used
- NEW wrap the read-more link in a paragraph tag