{"id":88566,"date":"2018-07-12T18:10:11","date_gmt":"2018-07-12T18:10:11","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/list-child-pages-shortcode\/"},"modified":"2025-09-24T19:41:55","modified_gmt":"2025-09-24T19:41:55","slug":"list-child-pages-shortcode","status":"publish","type":"plugin","link":"https:\/\/bo.wordpress.org\/plugins\/list-child-pages-shortcode\/","author":114529,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4.1","stable_tag":"1.4.0","tested":"6.7.5","requires":"3.0.1","requires_php":"","requires_plugins":null,"header_name":"List Child Pages Shortcode","header_author":"Douglas Karr","header_description":"Provides a shortcode to list child pages on a parent page. Uses a page excerpt for the child page description. Usage: [listchildpages aclass=\"\" ifempty=\"No child pages\"]<h3>Here are our child pages:<\/h3>[\/listchildpages]","assets_banners_color":"80a9c9","last_updated":"2025-09-24 19:41:55","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/dknewmedia.com","header_plugin_uri":"https:\/\/martech.zone\/list-child-pages-shortcode\/","header_author_uri":"https:\/\/dknewmedia.com\/","rating":5,"author_block_rating":0,"active_installs":600,"downloads":7529,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"douglaskarr","date":"2018-07-12 18:09:43"},"1.1.0":{"tag":"1.1.0","author":"douglaskarr","date":"2018-09-16 18:41:21"},"1.2.0":{"tag":"1.2.0","author":"douglaskarr","date":"2018-11-19 01:45:56"},"1.2.1":{"tag":"1.2.1","author":"douglaskarr","date":"2018-11-19 01:58:42"},"1.2.2":{"tag":"1.2.2","author":"douglaskarr","date":"2019-01-03 16:44:18"},"1.3.0":{"tag":"1.3.0","author":"douglaskarr","date":"2019-01-05 20:38:39"},"1.3.1":{"tag":"1.3.1","author":"douglaskarr","date":"2019-07-31 18:36:54"},"1.4.0":{"tag":"1.4.0","author":"douglaskarr","date":"2025-09-24 19:41:55"},"1.5.0":{"tag":"1.5.0","author":"douglaskarr","date":"2025-09-24 19:51:43"}},"upgrade_notice":{"1.4.0":"<ul>\n<li>New <code>parent<\/code> and <code>size<\/code> attributes. Backward-compatible. Please review usage examples.<\/li>\n<\/ul>","1.3.1":"<ul>\n<li>Tested in latest versions of WordPress<\/li>\n<\/ul>","1.3.0":"<ul>\n<li>Added more options!<\/li>\n<\/ul>","1.2.2":"<ul>\n<li>Corrected an undeclared variable error.<\/li>\n<\/ul>","1.2.1":"<ul>\n<li>Added documentation on where you can see all of the order and orderby parameters.<\/li>\n<\/ul>","1.2.0":"<ul>\n<li>Added another shortcode option for the order. Default is DESC.<\/li>\n<\/ul>","1.1.0":"<ul>\n<li>Added another shortcode option for the order. Default is publish_date.<\/li>\n<\/ul>","1.0.0":"<ul>\n<li>Initial Release<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":1908389,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":1908389,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":1908389,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.2.0","1.2.1","1.2.2","1.3.0","1.3.1","1.4.0","1.5.0"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":3367399,"resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":3367399,"resolution":"1","location":"plugin"}},"screenshots":{"1":"View of the shortcode.","2":"View of the output."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[9661,170,11165,80],"plugin_category":[43],"plugin_contributors":[79764],"plugin_business_model":[],"class_list":["post-88566","plugin","type-plugin","status-publish","hentry","plugin_tags-child-page","plugin_tags-page","plugin_tags-parent-page","plugin_tags-shortcode","plugin_category-customization","plugin_contributors-douglaskarr","plugin_committers-douglaskarr"],"banners":{"banner":"https:\/\/ps.w.org\/list-child-pages-shortcode\/assets\/banner-772x250.png?rev=1908389","banner_2x":"https:\/\/ps.w.org\/list-child-pages-shortcode\/assets\/banner-1544x500.png?rev=1908389","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/list-child-pages-shortcode\/assets\/icon.svg?rev=1908389","icon":"https:\/\/ps.w.org\/list-child-pages-shortcode\/assets\/icon.svg?rev=1908389","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/list-child-pages-shortcode\/trunk\/screenshot-1.png?rev=3367399","caption":"View of the shortcode."},{"src":"https:\/\/ps.w.org\/list-child-pages-shortcode\/trunk\/screenshot-2.png?rev=3367399","caption":"View of the output."}],"raw_content":"<!--section=description-->\n<p>I could not find an easy plugin that enabled me to use a shortcode that would enable me to publish a list of child pages under a parent page. So, I built one.<\/p>\n\n<h4>Usage<\/h4>\n\n<p>The shortcode is <code>[listchildpages]...[\/listchildpages]<\/code>. It accepts several attributes:<\/p>\n\n<ul>\n<li><strong>ifempty<\/strong>: Message or HTML to show if no child pages exist.<\/li>\n<li><strong>order<\/strong>: <code>ASC<\/code> or <code>DESC<\/code>. Default: <code>DESC<\/code>.<\/li>\n<li><strong>orderby<\/strong>: Field to order by. Default: <code>publish_date<\/code> (maps to <code>date<\/code>). Any valid <code>WP_Query<\/code> orderby value works.<\/li>\n<li><strong>displayimage<\/strong>: Show featured image (<code>yes|no<\/code>). Default: <code>no<\/code>.<\/li>\n<li><strong>align<\/strong>: CSS class to apply to the image (<code>alignleft<\/code>, <code>alignright<\/code>, etc.).<\/li>\n<li><strong>ulclass, liclass, aclass<\/strong>: CSS classes for the list, list items, and links.<\/li>\n<li><strong>parent<\/strong>: ID, slug\/path, or <code>current<\/code> to choose the parent page. Default: <code>current<\/code>.<\/li>\n<li><strong>size<\/strong>: Image size for thumbnails (<code>thumbnail<\/code>, <code>medium<\/code>, <code>large<\/code>, <code>full<\/code>, or custom size). Default: <code>thumbnail<\/code>.<\/li>\n<\/ul>\n\n<p>Examples:<\/p>\n\n<p>Example 1: Order the child pages by publish date in descending order:\n    [listchildpages aclass=\"\" ifempty=\"No child pages\" orderby=\"publish_date\" order=\"desc\" displayimage=\"no\"]<\/p>\n\n<h3>Here are our child pages:<\/h3>\n\n<pre><code>[\/listchildpages]\n<\/code><\/pre>\n\n<p>Example 2: Order the child pages by title in ascending order with the page's featured image aligned left:\n    [listchildpages orderby=\"title\" order=\"asc\" displayimage=\"yes\" align=\"alignleft\"]<\/p>\n\n<h3>Here are our child pages:<\/h3>\n\n<pre><code>[\/listchildpages]\n<\/code><\/pre>\n\n<p>Example 3: Target a specific parent page by ID and use medium-sized images:\n    [listchildpages parent=\"123\" displayimage=\"yes\" size=\"medium\"]<\/p>\n\n<h3>Resources<\/h3>\n\n<pre><code>[\/listchildpages]\n<\/code><\/pre>\n\n<p>Example 4: Target a parent page by slug and show full-size featured images:\n    [listchildpages parent=\"about\/company\" displayimage=\"yes\" size=\"full\"]<\/p>\n\n<h3>Team Sections<\/h3>\n\n<pre><code>[\/listchildpages]\n<\/code><\/pre>\n\n<p>Example 5: Explicitly set the parent as the current page and use large images:\n    [listchildpages parent=\"current\" displayimage=\"yes\" size=\"large\"]<\/p>\n\n<h3>Subpages<\/h3>\n\n<pre><code>[\/listchildpages]\n<\/code><\/pre>\n\n<p>The shortcode accepts all of the Order and Orderby Parameters listed within the <a href=\"https:\/\/codex.wordpress.org\/Class_Reference\/WP_Query#Order_.26_Orderby_Parameters\">WordPress class reference<\/a>.<\/p>\n\n<p>Built by <a href=\"http:\/\/www.dknewmedia.com\">DK New Media<\/a>, visit <a href=\"https:\/\/martech.zone\">MarTech<\/a> to keep up on this plugin and other marketing tools to help you grow your online presence!<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20can%20i%20add%20a%20description%20for%20each%20child%20page%3F'><h3>How can I add a description for each child page?<\/h3><\/dt>\n<dd><p>Edit the child page and you'll find an excerpt section where you can enter a description that will be published on the list.<\/p><\/dd>\n<dt id='how%20can%20i%20enable%20featured%20images%20on%20my%20site%3F'><h3>How can I enable featured images on my site?<\/h3><\/dt>\n<dd><p>Within your functions.php file, look for the add_theme_support post-thumbnails line and add page to the array. Or if you don't have that line, you can just add it:<\/p>\n\n<pre><code>add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );\n<\/code><\/pre><\/dd>\n<dt id='how%20can%20i%20modify%20the%20output%3F'><h3>How can I modify the output?<\/h3><\/dt>\n<dd><p>There are additional class fields for the unordered list tag (ulclass), list item tag (liclass), and the anchor tag (aclass). You can modify the output utilizing your theme's CSS.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Updated keywords for plugin<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Added <code>parent<\/code> attribute to target a specific parent page by ID or slug.<\/li>\n<li>Added <code>size<\/code> attribute to choose featured image size.<\/li>\n<li>Hardened shortcode sanitization and escaping for security.<\/li>\n<li>Backward-compatible with previous versions.<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Tested in latest versions of WordPress<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Tested in latest versions of WordPress<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Added an option to display the featured image for the page.<\/li>\n<li>Added class outputs for the ul and li tags in addition to the anchor text.<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Corrected an undeclared variable error.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Added documentation on where you can see all of the order and orderby parameters.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Added another shortcode option for the order. Default is DESC.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added another shortcode option for the orderby. Default is publish_date.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Release<\/li>\n<\/ul>","raw_excerpt":"A simple plugin to add list of child pages within the content of a parent page.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/88566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=88566"}],"author":[{"embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/douglaskarr"}],"wp:attachment":[{"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=88566"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=88566"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=88566"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=88566"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=88566"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/bo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=88566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}