Page-list Shortcodes

Below, you’ll find a detailed guide on how to add the Page-list Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Page-list Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Page-list Plugin and the shortcodes it provides:

Plugin Icon
Page-list

"Page-list is a WordPress plugin designed to effortlessly create and manage a list of all your website pages. It's the perfect tool for easy navigation and enhanced user experience."

★★★★☆ (84) Active Installs: 50000+ Tested with: 6.2.3 PHP Version: false
Included Shortcodes:
  • [pagelist]
  • [subpages]
  • [siblings]
  • [pagelist_ext]

Page-list [pagelist] Shortcode

The Pagelist shortcode is a versatile tool that allows users to generate a list of pages on their WordPress site. It takes various parameters like depth, child_of, exclude, etc., to customize the output.

Shortcode: [pagelist]

Parameters

Here is a list of all possible pagelist shortcode parameters and attributes:

  • depth – Determines the levels of pages to be included in the list.
  • child_of – Lists only the pages that are subpages of a specific ID.
  • exclude – Excludes certain pages from the list by ID.
  • exclude_tree – Excludes a whole page hierarchy from the list.
  • include – Only includes certain pages in the list by ID.
  • title_li – Sets the title for the list.
  • number – Limits the number of pages to display.
  • offset – Skips a number of pages at the beginning.
  • meta_key – Lists pages that have a specific custom field.
  • meta_value – Lists pages that have a specific value for the custom field.
  • show_date – Displays the date of the pages.
  • date_format – Sets the format for the date.
  • authors – Lists pages by specific authors.
  • sort_column – Sorts the pages based on a specific column.
  • sort_order – Determines the order of the pages (ascending or descending).
  • link_before – Adds text or HTML before the page link.
  • link_after – Adds text or HTML after the page link.
  • post_type – Lists pages of a specific post type.
  • post_status – Lists pages with a specific post status.

Examples and Usage

Basic example – Display a list of all pages on your WordPress site using the ‘pagelist’ shortcode.

[pagelist /]

Advanced examples

Display a list of child pages of a specific page, excluding certain pages, and ordering by page title in ascending order.

[pagelist child_of="10" exclude="5,15" sort_column="post_title" sort_order="asc" /]

Display a list of pages including specific pages, limiting the number of pages to 10, and offsetting the start of the list by 2 pages.

[pagelist include="5,10,15" number="10" offset="2" /]

Display a list of pages with a custom link before and after each page title, and only showing pages of a certain post type and status.

[pagelist link_before="" link_after="" post_type="page" post_status="publish" /]

Display a list of pages excluding a tree of pages, and showing the page date in a custom format.

[pagelist exclude_tree="5" show_date="created" date_format="j F Y" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [pagelist] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'pagelist', 'pagelist_unqprfx_shortcode' );

Shortcode PHP function:

function pagelist_unqprfx_shortcode( $atts ) {
		global $post, $pagelist_unq_settings;
		$return = '';
		extract( shortcode_atts( $pagelist_unq_settings['page_list_defaults'], $atts ) );

		$page_list_args = array(
			'depth'        => $depth,
			'child_of'     => pagelist_unqprfx_norm_params($child_of),
			'exclude'      => pagelist_unqprfx_norm_params($exclude),
			'exclude_tree' => pagelist_unqprfx_norm_params($exclude_tree),
			'include'      => pagelist_unqprfx_norm_params($include),
			'title_li'     => $title_li,
			'number'       => $number,
			'offset'       => $offset,
			'meta_key'     => $meta_key,
			'meta_value'   => $meta_value,
			'show_date'    => $show_date,
			'date_format'  => $date_format,
			'echo'         => 0,
			'authors'      => $authors,
			'sort_column'  => $sort_column,
			'sort_order'   => $sort_order,
			'link_before'  => $link_before,
			'link_after'   => $link_after,
			'post_type'    => $post_type,
			'post_status'  => $post_status
		);
		$list_pages = wp_list_pages( $page_list_args );

		$return .= $pagelist_unq_settings['powered_by'];
		if ($list_pages) {
			$return .= '<ul class="page-list '.esc_attr($class).'">'."\n".$list_pages."\n".'</ul>';
		} else {
			$return .= '<!-- no pages to show -->';
		}
		return $return;
	}

Code file location:

page-list/page-list/page-list.php

Page-list [subpages] Shortcode

The ‘subpages’ shortcode from the Page-List plugin generates a list of subpages for the current page. It offers customization options including depth, exclusion of specific pages, and sorting order.

Shortcode: [subpages]

Parameters

Here is a list of all possible subpages shortcode parameters and attributes:

  • depth – Sets the number of levels in the hierarchy of pages to be included.
  • child_of – Displays the subpages of a single Page by ID.
  • exclude – Defines the pages to be excluded by their ID.
  • exclude_tree – Excludes pages and their descendants by page ID.
  • include – Defines the specific pages to be included by their ID.
  • title_li – Sets the text for the list item which contains the link.
  • number – Limits the number of pages to be displayed.
  • offset – Defines the number of pages to skip before starting to display.
  • meta_key – Pages with a specific custom field key will be included.
  • meta_value – Pages with a specific custom field value will be included.
  • show_date – If set, the date of pages will be displayed.
  • date_format – Sets the date format if the date is displayed.
  • authors – Pages by specific authors will be included.
  • sort_column – Defines the column to sort the pages by.
  • sort_order – Sets the order of the pages (ascending or descending).
  • link_before – Text or HTML to put before the link text.
  • link_after – Text or HTML to put after the link text.
  • post_type – Type of post to display. Defaults to ‘page’.
  • post_status – Status of the post to display. Defaults to ‘publish’.

Examples and Usage

Basic example – Display subpages of the current page.

[subpages /]

Advanced examples

Display subpages of the current page but exclude specific pages by their IDs. Here, we are excluding pages with IDs 10 and 15.

[subpages exclude="10,15" /]

Display subpages of the current page and sort them by page title in ascending order.

[subpages sort_column="post_title" sort_order="asc" /]

Display subpages of the current page and show the date the pages were published in the format ‘mm/dd/yyyy’.

[subpages show_date="created" date_format="m/d/Y" /]

Display subpages of the current page and limit the depth of subpages to display to 2 levels.

[subpages depth="2" /]

Display subpages of the current page but only include specific pages by their IDs. Here, we are including pages with IDs 5 and 7.

[subpages include="5,7" /]

Display subpages of the current page and only show pages authored by a specific author. Here, we are showing pages authored by the user with ID 2.

[subpages authors="2" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [subpages] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'subpages', 'subpages_unqprfx_shortcode' );

Shortcode PHP function:

function subpages_unqprfx_shortcode( $atts ) {
		global $post, $pagelist_unq_settings;
		$return = '';
		extract( shortcode_atts( $pagelist_unq_settings['page_list_defaults'], $atts ) );

		$page_list_args = array(
			'depth'        => $depth,
			'child_of'     => isset($post->ID) ? $post->ID : 0,
			'exclude'      => pagelist_unqprfx_norm_params($exclude),
			'exclude_tree' => pagelist_unqprfx_norm_params($exclude_tree),
			'include'      => pagelist_unqprfx_norm_params($include),
			'title_li'     => $title_li,
			'number'       => $number,
			'offset'       => $offset,
			'meta_key'     => $meta_key,
			'meta_value'   => $meta_value,
			'show_date'    => $show_date,
			'date_format'  => $date_format,
			'echo'         => 0,
			'authors'      => $authors,
			'sort_column'  => $sort_column,
			'sort_order'   => $sort_order,
			'link_before'  => $link_before,
			'link_after'   => $link_after,
			'post_type'    => $post_type,
			'post_status'  => $post_status
		);
		$list_pages = wp_list_pages( $page_list_args );

		$return .= $pagelist_unq_settings['powered_by'];
		if ($list_pages) {
			$return .= '<ul class="page-list subpages-page-list '.esc_attr($class).'">'."\n".$list_pages."\n".'</ul>';
		} else {
			$return .= '<!-- no pages to show -->';
		}
		return $return;
	}

Code file location:

page-list/page-list/page-list.php

Page-list [siblings] Shortcode

The ‘siblings’ shortcode from the Page-List plugin generates a list of sibling pages to the current page. It uses the wp_list_pages function, allowing for flexible parameters. It excludes the current page, if specified, and can be customized with various parameters like depth, meta_key, sort order, etc. The output is a list of pages wrapped in ‘ul’ HTML tags. Shortcode: [siblings]

Shortcode: [siblings]

Parameters

Here is a list of all possible siblings shortcode parameters and attributes:

  • depth – Determines how many levels of pages are displayed.
  • child_of – Lists only the pages that are subpages of a specific page.
  • exclude – Excludes certain pages from the list.
  • exclude_tree – Excludes all pages under a specific parent.
  • include – Only includes specific pages in the list.
  • title_li – Sets the text for the list’s title.
  • number – Limits the number of pages that are displayed.
  • offset – Skips a certain number of pages in the list.
  • meta_key – Filters pages based on the custom field key.
  • meta_value – Filters pages based on the custom field value.
  • show_date – Shows the date of the pages.
  • date_format – Changes the format of the displayed date.
  • authors – Displays pages from specific authors.
  • sort_column – Determines the column that the pages are sorted by.
  • sort_order – Decides the order that the pages are displayed in.
  • link_before – Adds text or HTML before the page link.
  • link_after – Adds text or HTML after the page link.
  • post_type – Determines the type of post to list.
  • post_status – Filters the pages by their publication status.

Examples and Usage

Basic example – Displaying a list of sibling pages excluding the current page

[siblings exclude='current']

Advanced examples

Displaying a list of sibling pages excluding the current page and limiting the depth to 2 levels

[siblings exclude='current' depth='2']

Displaying a list of sibling pages excluding the current page and ordering them by page title in ascending order

[siblings exclude='current' sort_column='post_title' sort_order='asc']

Displaying a list of sibling pages excluding the current page, showing the date of each page in ‘Y-m-d’ format

[siblings exclude='current' show_date='created' date_format='Y-m-d']

Displaying a list of sibling pages excluding the current page, filtering the pages by author id

[siblings exclude='current' authors='3']

Displaying a list of sibling pages excluding the current page, including pages with specific IDs

[siblings exclude='current' include='5,6,7']

PHP Function Code

In case you have difficulties debugging what causing issues with [siblings] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'siblings', 'siblings_unqprfx_shortcode' );

Shortcode PHP function:

function siblings_unqprfx_shortcode( $atts ) {
		global $post, $pagelist_unq_settings;
		$return = '';
		extract( shortcode_atts( $pagelist_unq_settings['page_list_defaults'], $atts ) );

		if ( $exclude == 'current' || $exclude == 'this' ) {
			$exclude = isset($post->ID) ? $post->ID : 0;
		}

		$page_list_args = array(
			'depth'        => $depth,
			'child_of'     => isset($post->post_parent) ? $post->post_parent : 0,
			'exclude'      => pagelist_unqprfx_norm_params($exclude),
			'exclude_tree' => pagelist_unqprfx_norm_params($exclude_tree),
			'include'      => pagelist_unqprfx_norm_params($include),
			'title_li'     => $title_li,
			'number'       => $number,
			'offset'       => $offset,
			'meta_key'     => $meta_key,
			'meta_value'   => $meta_value,
			'show_date'    => $show_date,
			'date_format'  => $date_format,
			'echo'         => 0,
			'authors'      => $authors,
			'sort_column'  => $sort_column,
			'sort_order'   => $sort_order,
			'link_before'  => $link_before,
			'link_after'   => $link_after,
			'post_type'    => $post_type,
			'post_status'  => $post_status
		);
		$list_pages = wp_list_pages( $page_list_args );

		$return .= $pagelist_unq_settings['powered_by'];
		if ($list_pages) {
			$return .= '<ul class="page-list siblings-page-list '.esc_attr($class).'">'."\n".$list_pages."\n".'</ul>';
		} else {
			$return .= '<!-- no pages to show -->';
		}
		return $return;
	}

Code file location:

page-list/page-list/page-list.php

Page-list [pagelist_ext] Shortcode

The Page-List plugin shortcode allows you to display a list of pages on your website. It offers customizable options like showing images, titles, content, and more. This shortcode provides extensive control over the output. You can define the order of pages, limit content length, set image dimensions, and even choose to display the first image from the page content. Additionally, it gives you the flexibility to exclude or include specific pages, filter by authors, post type, and status. It also allows you to manipulate the meta key-value pairs. The shortcode is designed to show subpages if ‘child_of’ is empty. If there are no subpages, it will display all pages. In summary, this shortcode is a powerful tool for displaying and customizing a list of pages in WordPress.

Shortcode: [pagelist_ext]

Parameters

Here is a list of all possible pagelist_ext shortcode parameters and attributes:

  • show_image – Displays the featured image of the page.
  • show_first_image – Shows the first image in the page content.
  • show_title – Displays the title of the page.
  • show_content – Shows the content of the page.
  • more_tag – Includes the WordPress ‘more’ tag in the content.
  • limit_content – Limits the length of the content display.
  • image_width – Sets the width of the displayed image.
  • image_height – Sets the height of the displayed image.
  • child_of – Lists pages that are children of a specific page.
  • sort_order – Determines the order in which pages are listed.
  • sort_column – Defines the column by which pages are sorted.
  • hierarchical – Lists pages in a hierarchical manner.
  • exclude – Excludes certain pages from the list.
  • include – Includes certain pages in the list.
  • meta_key – Filters pages by a specific meta key.
  • meta_value – Filters pages by a specific meta value.
  • authors – Filters pages by author.
  • parent – Lists pages that have a specific parent.
  • exclude_tree – Excludes a tree of pages from the list.
  • number – Limits the number of pages listed.
  • offset – Skips a specific number of pages in the list.
  • post_type – Filters pages by post type.
  • post_status – Filters pages by post status.
  • class – Adds a CSS class to the list of pages.
  • strip_tags – Removes HTML tags from the content.
  • strip_shortcodes – Removes shortcodes from the content.
  • show_child_count – Displays the number of child pages.
  • child_count_template – Sets the template for the child count display.
  • show_meta_key – Displays a specific meta key.
  • meta_template – Sets the template for the meta key display.

Examples and Usage

Basic example – Utilize the shortcode to display a list of pages with default settings.

[pagelist_ext /]

Advanced examples

Display a list of pages with images and titles, but without content. The pages are sorted in descending order based on the title.

[pagelist_ext show_content=0 sort_order="DESC" sort_column="post_title" /]

Display a list of pages, excluding certain pages with IDs 5, 10, and 15. The content is limited to 100 characters, and the images are 200px wide and 200px tall.

[pagelist_ext exclude="5,10,15" limit_content=100 image_width="200" image_height="200" /]

Display a list of pages with a specific post type, such as “product”. The pages are sorted by the custom field “price” in ascending order.

[pagelist_ext post_type="product" sort_column="meta_value_num" meta_key="price" sort_order="ASC" /]

Display a list of pages, only showing the first image of each page. The pages are sorted by the menu order and then by the title in ascending order.

[pagelist_ext show_first_image=1 sort_column="menu_order, post_title" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [pagelist_ext] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'pagelist_ext', 'pagelist_unqprfx_ext_shortcode' );

Shortcode PHP function:

function pagelist_unqprfx_ext_shortcode( $atts ) {
		global $post, $pagelist_unq_settings;
		$return = '';
		extract( shortcode_atts( array(
			'show_image' => 1,
			'show_first_image' => 0,
			'show_title' => 1,
			'show_content' => 1,
			'more_tag' => 1,
			'limit_content' => 250,
			'image_width' => '150',
			'image_height' => '150',
			'child_of' => '',
			'sort_order' => 'ASC',
			'sort_column' => 'menu_order, post_title',
			'hierarchical' => 1,
			'exclude' => '0',
			'include' => '0',
			'meta_key' => '',
			'meta_value' => '',
			'authors' => '',
			'parent' => -1,
			'exclude_tree' => '',
			'number' => '',
			'offset' => 0,
			'post_type' => 'page',
			'post_status' => 'publish',
			'class' => '',
			'strip_tags' => 1,
			'strip_shortcodes' => 1,
			'show_child_count' => 0,
			'child_count_template' => 'Subpages: %child_count%',
			'show_meta_key' => '',
			'meta_template' => '%meta%'
		), $atts ) );

		if ( $child_of == '' ) { // show subpages if child_of is empty
			$child_of = isset($post->ID) ? $post->ID : 0;
		}

		$page_list_ext_args = array(
			'show_image' => $show_image,
			'show_first_image' => $show_first_image,
			'show_title' => $show_title,
			'show_content' => $show_content,
			'more_tag' => $more_tag,
			'limit_content' => $limit_content,
			'image_width' => $image_width,
			'image_height' => $image_height,
			'sort_order' => $sort_order,
			'sort_column' => $sort_column,
			'hierarchical' => $hierarchical,
			'exclude' => pagelist_unqprfx_norm_params($exclude),
			'include' => pagelist_unqprfx_norm_params($include),
			'meta_key' => $meta_key,
			'meta_value' => $meta_value,
			'authors' => $authors,
			'child_of' => pagelist_unqprfx_norm_params($child_of),
			'parent' => pagelist_unqprfx_norm_params($parent),
			'exclude_tree' => pagelist_unqprfx_norm_params($exclude_tree),
			'number' => '', // $number - own counter
			'offset' => 0, // $offset - own offset
			'post_type' => $post_type,
			'post_status' => $post_status,
			'class' => $class,
			'strip_tags' => $strip_tags,
			'strip_shortcodes' => $strip_shortcodes,
			'show_child_count' => $show_child_count,
			'child_count_template' => $child_count_template,
			'show_meta_key' => $show_meta_key,
			'meta_template' => $meta_template
		);
		$page_list_ext_args_all = array(
			'show_image' => $show_image,
			'show_first_image' => $show_first_image,
			'show_title' => $show_title,
			'show_content' => $show_content,
			'more_tag' => $more_tag,
			'limit_content' => $limit_content,
			'image_width' => $image_width,
			'image_height' => $image_height,
			'sort_order' => $sort_order,
			'sort_column' => $sort_column,
			'hierarchical' => $hierarchical,
			'exclude' => pagelist_unqprfx_norm_params($exclude),
			'include' => pagelist_unqprfx_norm_params($include),
			'meta_key' => $meta_key,
			'meta_value' => $meta_value,
			'authors' => $authors,
			'child_of' => 0, // for showing all pages
			'parent' => pagelist_unqprfx_norm_params($parent),
			'exclude_tree' => pagelist_unqprfx_norm_params($exclude_tree),
			'number' => '', // $number - own counter
			'offset' => 0, // $offset - own offset
			'post_type' => $post_type,
			'post_status' => $post_status,
			'class' => $class,
			'strip_tags' => $strip_tags,
			'strip_shortcodes' => $strip_shortcodes,
			'show_child_count' => $show_child_count,
			'child_count_template' => $child_count_template,
			'show_meta_key' => $show_meta_key,
			'meta_template' => $meta_template
		);
		$list_pages = get_pages( $page_list_ext_args );
		if ( count( $list_pages ) == 0 ) { // if there is no subpages
			$list_pages = get_pages( $page_list_ext_args_all ); // we are showing all pages
		}
		$list_pages_html = '';
		$count = 0;
		$offset_count = 0;
		if ( $list_pages !== false && count( $list_pages ) > 0 ) {
			foreach($list_pages as $page){
				$count++;
				$offset_count++;
				if ( !empty( $offset ) && is_numeric( $offset ) && $offset_count <= $offset ) {
					$count = 0; // number counter to zero if offset is not finished
				}
				if ( ( !empty( $offset ) && is_numeric( $offset ) && $offset_count > $offset ) || ( empty( $offset ) ) || ( !empty( $offset ) && !is_numeric( $offset ) ) ) {
					if ( ( !empty( $number ) && is_numeric( $number ) && $count <= $number ) || ( empty( $number ) ) || ( !empty( $number ) && !is_numeric( $number ) ) ) {
						$link = get_permalink( $page->ID );
						$list_pages_html .= '<div class="page-list-ext-item">';
						if ( $show_image == 1 ) {
							if ( get_the_post_thumbnail( $page->ID ) ) { // if there is a featured image
								$list_pages_html .= '<div class="page-list-ext-image"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">';
								//$list_pages_html .= get_the_post_thumbnail($page->ID, array($image_width,$image_height)); // doesn't work good with image size

								$image = wp_get_attachment_image_src( get_post_thumbnail_id( $page->ID ), array($image_width,$image_height) ); // get featured img; 'large'
								$img_url = $image[0]; // get the src of the featured image
								$list_pages_html .= '<img src="'.$img_url.'" width="'.$image_width.'" alt="'.esc_attr($page->post_title).'" />'; // not using height="'.$image_height.'" because images could be not square shaped and they will be stretched

								$list_pages_html .= '</a></div> ';
							} else {
								if ( $show_first_image == 1 ) {
									$img_scr = pagelist_unqprfx_get_first_image( $page->post_content );
									if ( !empty( $img_scr ) ) {
										$list_pages_html .= '<div class="page-list-ext-image"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">';
										$list_pages_html .= '<img src="'.$img_scr.'" width="'.$image_width.'" alt="'.esc_attr($page->post_title).'" />'; // not using height="'.$image_height.'" because images could be not square shaped and they will be stretched
										$list_pages_html .= '</a></div> ';
									}
								}
							}
						}


						if ( $show_title == 1 ) {
							$list_pages_html .= '<h3 class="page-list-ext-title"><a href="'.$link.'" title="'.esc_attr($page->post_title).'">'.$page->post_title.'</a></h3>';
						}
						if ( $show_content == 1 ) {
							//$content = apply_filters('the_content', $page->post_content);
							//$content = str_replace(']]>', ']]&gt;', $content); // both used in default the_content() function

							if ( !empty( $page->post_excerpt ) ) {
								$text_content = $page->post_excerpt;
							} else {
								$text_content = $page->post_content;
							}

							if ( post_password_required($page) ) {
								$content = '<!-- password protected -->';
							} else {
								$content = pagelist_unqprfx_parse_content( $text_content, $limit_content, $strip_tags, $strip_shortcodes, $more_tag );
								$content = do_shortcode( $content );

								if ( $show_title == 0 ) { // make content as a link if there is no title
									$content = '<a href="'.$link.'">'.$content.'</a>';
								}
							}

							$list_pages_html .= '<div class="page-list-ext-item-content">'.$content.'</div>';

						}
						if ( $show_child_count == 1 ) {
							$count_subpages = count(get_pages("child_of=".$page->ID));
							if ( $count_subpages > 0 ) { // hide empty
								$child_count_pos = strpos($child_count_template, '%child_count%'); // check if we have %child_count% marker in template
								if ($child_count_pos === false) { // %child_count% not found in template
									$child_count_template_html = $child_count_template.' '.$count_subpages;
									$list_pages_html .= '<div class="page-list-ext-child-count">'.$child_count_template_html.'</div>';
								} else { // %child_count% found in template
									$child_count_template_html = str_replace('%child_count%', $count_subpages, $child_count_template);
									$list_pages_html .= '<div class="page-list-ext-child-count">'.$child_count_template_html.'</div>';
								}
							}
						}
						if ( $show_meta_key != '' ) {
							$post_meta = do_shortcode(get_post_meta($page->ID, $show_meta_key, true));
							if ( !empty($post_meta) ) { // hide empty
								$meta_pos = strpos($meta_template, '%meta%'); // check if we have %meta% marker in template
								if ($meta_pos === false) { // %meta% not found in template
									$meta_template_html = $meta_template.' '.$post_meta;
									$list_pages_html .= '<div class="page-list-ext-meta">'.$meta_template_html.'</div>';
								} else { // %meta% found in template
									$meta_template_html = str_replace('%meta%', $post_meta, $meta_template);
									$list_pages_html .= '<div class="page-list-ext-meta">'.$meta_template_html.'</div>';
								}
							}
						}
						$list_pages_html .= '</div>'."\n";
					}
				}
			}
		}
		$return .= $pagelist_unq_settings['powered_by'];
		if ($list_pages_html) {
			$return .= '<div class="page-list page-list-ext '.esc_attr($class).'">'."\n".$list_pages_html."\n".'</div>';
		} else {
			$return .= '<!-- no pages to show -->'; // this line will not work, because we show all pages if there is no pages to show
		}
		return $return;
	}

Code file location:

page-list/page-list/page-list.php

Conclusion

Now that you’ve learned how to embed the Page-list Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *