If you don't want to list child pages on all your empty pages using a [link id="2865"]page template[/link] or a [link id="5246"]filter[/link], you can create a simple shortcode: Then place [[children]] in your page content where you want the list to appear. … [Read more...] about Listing child pages with a shortcode
Posts and Pages
Listing children on empty pages as a filter
Yesterday, I showed you how to automatically list child pages if a page's content is empty. That code would go in your theme's page.php file. What if you wanted to use it in any theme? The best solution is to turn it into a little plugin: Paste the code into a file in your … [Read more...] about Listing children on empty pages as a filter
Automatically list children on empty pages
Here's a little snippet I use in my theme's page templates. It figures out whether a page's content is empty, and if it is, a list of all its child pages is printed where the content would usually go. To use this, find the_content() in your page.php file and replace it with that … [Read more...] about Automatically list children on empty pages
Take control of your excerpts
Here are three short functions you can add to your theme's functions.php file to change the way excerpts work on your site. When you use the_excerpt() in a theme file, WordPress will first use the contents of the Excerpt field from your Post→Edit screen. If it's empty, … [Read more...] about Take control of your excerpts
Listing child pages
The Codex offers a way to list the children of the current page by adding this to your theme: … [Read more...] about Listing child pages
Posts vs. Pages
Should you use posts or pages for your content? On the surface, they are much the same in WordPress. They share a similar editing screen1. Both can accept comments and trackbacks. How do you decide which is best for you? If your site contains a blog of any variety — a … [Read more...] about Posts vs. Pages