A landing page introduces a section and points people to the pages beneath it. Rather than typing and maintaining those links, add one of two shortcodes and the theme lists the sub-pages for you. New sub-pages appear as soon as they are published, and pages you move or delete drop out.
[landingpage]shows each sub-page as a row with its featured image, its title and a short excerpt.[childblocks]shows the sub-pages as a grid of compact tiles, title only, which suits a section with many short pages.
Both list only the direct children of a page: pages whose Parent is that page. Grandchildren are not included. To show a whole branch of the page tree, use the pagetree shortcode. Both shortcodes list pages only, not news, tasks or other content types.
Add a landing page shortcode
Edit the parent page in the Classic Editor and type the shortcode where the list should appear. Or select the Insert shortcode button on the editor toolbar, choose Landing page or Child blocks, fill in the boxes and select Insert.
[landingpage]
With no attributes, the shortcode lists the sub-pages of the page it is on. Only published sub-pages are shown, in the order set in each sub-page’s Page Attributes box under Order, then alphabetically by title.
Attributes of landingpage and childblocks
Both shortcodes accept the same four attributes.
id
Optional. The ID of the page whose sub-pages you want, when it is not the page the shortcode is on. Use it to show a section’s index on the homepage or on another page. Find a page’s ID in the address bar when editing it: post.php?post=123&action=edit means the ID is 123. Without an id, the shortcode shows nothing on anything other than a page.
exclude
Optional. Page IDs to leave out, separated by commas, such as exclude="45,212". Use it to hide a sub-page that has its own link elsewhere on the page.
type
Optional. Set type="list" for a plain bulleted list of linked titles, with no images, excerpts or tiles. Leave it out for the rows (landingpage) or tiles (childblocks).
dateorder
Optional. Order by publication date instead of the page order: dateorder="DESC" for newest first, dateorder="ASC" for oldest first. When it is set, each entry also shows its date. Leave it out to keep the page order.
What landingpage shows
One row per sub-page: the featured image on the left if there is one, then the title as a link, then the excerpt. The excerpt is the sub-page’s own excerpt if one has been written, otherwise the first 30 words of its content, so it is worth writing an excerpt for each sub-page. See Set a featured image and Generate an excerpt.
What childblocks shows
A grid of compact tiles, each showing a sub-page’s title and linking to it. There are no images or excerpts, so it works well for a section of ten or twenty short pages, such as a policy library or a set of forms.
Examples of landingpage and childblocks
Rows with images and excerpts for the sub-pages of this page:
[landingpage]
A plain list of the sub-pages of page 87, newest first with dates, leaving out page 90:
[landingpage id="87" type="list" dateorder="DESC" exclude="90"]
Tiles for the sub-pages of this page:
[childblocks]
Tiles for the sub-pages of page 87, shown on the homepage or any other page:
[childblocks id="87"]
