Page-list

WordPress Pro pluginsPage-listdonateview source

WordPress Pagelist plugin

WordPress Pagelist plugin

Plugin helps you to show list of pages of your web-site with [pagelist], [subpages], [siblings] and [pagelist_ext] shortcodes. Very usefull for adding sitemap or list of subpages or list of products with thumbnails on your web-site.

Documentation

Shortcodes [pagelist], [subpages], [siblings] are based on wp_list_pages('title_li=') function and show hierarchical tree of pages;
You can use aditional parameters: [pagelist depth="2" child_of="4" exclude="6,7,8"].
Shortcodes [pagelist], [subpages] and [siblings] accept the same parameters. The only difference is that [subpages] and [siblings] not accept child_of parameter, because [subpages] shows subpages to the current page and [siblings] shows subpages to the parent page.

Shortcode [pagelist_ext] is based on get_pages() function and show list of pages with featured image and with excerpt;
You can use aditional parameters: [pagelist_ext child_of="4" exclude="6,7,8" image_width="50" image_height="50"].

Parameters for [pagelist], [subpages] and [siblings]:

  • depth - means how many levels in the hierarchy of pages are to be included in the list, by default depth is unlimited (depth=0), but you can specify it like this: [pagelist depth="3"]; If you want to show flat list of pages (not hierarchical tree) you can use this shortcode: [pagelist depth="-1"];
  • child_of - if you want to show subpages of the specific page you can use this shortcode: [pagelist child_of="4"] where 4 is the ID of the specific page; If you want to show subpages of the current page you can use this shortcodes: [subpages] or [pagelist child_of="current"] or [pagelist child_of="this"]; If you want to show sibling pages of the current page you can use this shortcodes: [siblings] or [pagelist child_of="parent"];
  • exclude - if you want to exclude some pages from the list you can use this shortcode: [pagelist exclude="6,7,8"] where exclude parameter accepts comma-separated list of Page IDs; You may exclude current page with this shortcode: [pagelist exclude="current"];
  • exclude_tree - if you want to exclude the tree of pages from the list you can use this shortcode: [pagelist exclude_tree="7,10"] where exclude_tree parameter accepts comma-separated list of Page IDs (all this pages and their subpages will be excluded);
  • include - if you want to include certain pages into the list of pages you can use this shortcode: [pagelist include="6,7,8"] where include parameter accepts comma-separated list of Page IDs;
  • title_li - if you want to specify the title of the list of pages you can use this shortcode: [pagelist title_li="<h2>List of pages</h2>"]; by default there is no title (title_li="");
  • number - if you want to specify the number of pages to be included into list of pages you can use this shortcode: [pagelist number="10"]; by default the number is unlimited (number="");
  • offset - if you want to pass over (or displace) some pages you can use this shortcode: [pagelist offset="5"]; by default there is no offset (offset="");
  • meta_key - if you want to include the pages that have this Custom Field Key you can use this shortcode: [pagelist meta_key="metakey" meta_value="metaval"];
  • show_date - if you want to show the date of the page you can use this shortcode: [pagelist show_date="created"]; you can use this values for show_date parameter: created, modified, updated;
  • menu_order - if you want to specify the column by what to sort you can use this shortcode: [pagelist sort_column="menu_order"]; by default order columns are menu_order and post_title (sort_column="menu_order, post_title"); you can use this values for sort_column parameter: post_title, menu_order, post_date (sort by creation time), post_modified (sort by last modified time), ID, post_author (sort by the page author's numeric ID), post_name (sort by page slug);
  • sort_order - if you want to change the sort order of the list of pages (either ascending or descending) you can use this shortcode: [pagelist sort_order="desc"]; by default sort_order is asc (sort_order="asc"); you can use this values for sort_order parameter: asc, desc;
  • link_before - if you want to specify the text or html that precedes the link text inside the link tag you can use this shortcode: [pagelist link_before="<span>"]; you may specify html tags only in the HTML tab in your Rich-text editor;
  • link_after - if you want to specify the text or html that follows the link text inside the link tag you can use this shortcode: [pagelist link_after="</span>"]; you may specify html tags only in the HTML tab in your Rich-text editor;
  • class - if you want to specify the CSS class for list of pages you can use this shortcode: [pagelist class="listclass"]; by default the class is empty (class="");

Parameters for [pagelist_ext]:

WordPress Pagelist plugin

  • show_image - show or hide featured image [pagelist_ext show_image="0"]; "show_image" have higher priority than "show_first_image"; by default: show_image="1";
  • show_first_image - show or hide first image from content if there is no featured image [pagelist_ext show_first_image="1"]; by default: show_first_image="0";
  • show_title - show or hide title [pagelist_ext show_title="0"]; by default: show_title="1";
  • show_content - show or hide content [pagelist_ext show_content="0"]; by default: show_content="1";
  • more_tag - if you want to output all content before and after more tag use this shortcode: [pagelist_ext more_tag="0"]; this parameter does not add "more-link" to the end of content, it just cut content before more-tag; "more_tag" parameter have higher priority than "limit_content"; by default the more_tag is enabled (more_tag="1") and showing only content before more tag;
  • limit_content - content is limited by "more-tag" if it is exist or by "limit_content" parameter [pagelist_ext limit_content="100"]; by default: limit_content="250";
  • image_width - width of the image [pagelist_ext image_width="80"]; by default: image_width="50";
  • image_height - height of the image [pagelist_ext image_height="80"]; by default: image_height="50";
  • child_of - if you want to show subpages of the specific page you can use this shortcode: [pagelist_ext child_of="4"] where 4 is the ID of the specific page; by default it shows subpages to the current page;
  • parent - if you want to show subpages of the specific page only you can use this shortcode: [pagelist_ext parent="4"] where 4 is the ID of the specific page and the depth will be only one level; by default parent="-1" and depth is unlimited;
  • sort_order - if you want to change the sort order of the list of pages (either ascending or descending) you can use this shortcode: [pagelist_ext sort_order="desc"]; by default: sort_order="asc"; you can use this values for sort_order parameter: asc, desc;
  • sort_column - if you want to specify the column by what to sort you can use this shortcode: [pagelist_ext sort_column="menu_order"]; by default order columns are sort_column and post_title (sort_column="menu_order, post_title"); you can use this values for sort_column parameter: post_title, menu_order, post_date (sort by creation time), post_modified (sort by last modified time), ID, post_author (sort by the page author's numeric ID), post_name (sort by page slug);
  • hierarchical - display sub-pages below their parent page [pagelist_ext hierarchical="0"]; by default: hierarchical="1";
  • exclude - if you want to exclude some pages from the list you can use this shortcode: [pagelist_ext exclude="6,7,8"] where exclude parameter accepts comma-separated list of Page IDs;
  • exclude_tree - if you want to exclude the tree of pages from the list you can use this shortcode: [pagelist_ext exclude_tree="7,10"] where exclude_tree parameter accepts comma-separated list of Page IDs (all this pages and their subpages will be excluded);
  • include - if you want to include certain pages into the list of pages you can use this shortcode: [pagelist_ext include="6,7,8"] where include parameter accepts comma-separated list of Page IDs;
  • meta_key - if you want to include the pages that have this Custom Field Key you can use this shortcode: [pagelist_ext meta_key="metakey" meta_value="metaval"];
  • authors - only include the pages written by the given author(s) [pagelist_ext authors="6,7,8"];
  • number - if you want to specify the number of pages to be included into list of pages you can use this shortcode: [pagelist_ext number="10"]; by default the number is unlimited (number="");
  • offset - if you want to pass over (or displace) some pages you can use this shortcode: [pagelist_ext offset="5"]; by default there is no offset (offset="");
  • post_type - [pagelist_ext post_type="page"];
  • post_status - [pagelist_ext post_status="publish"];
  • class - if you want to specify the CSS class for list of pages you can use this shortcode: [pagelist_ext class="listclass"]; by default the class is empty (class="");
  • strip_tags - if you want to output the content with tags use this shortcode: [pagelist_ext strip_tags="0"]; by default the strip_tags is enabled (strip_tags="1");
  • strip_shortcodes - if you want to output the content with shortcode use this shortcode: [pagelist_ext strip_shortcodes="0"]; by default the strip_shortcodes is enabled (strip_shortcodes="1") and all registered shortcodes are removed;
  • show_child_count - if you want to show child count you can use this shortcode: [pagelist_ext show_child_count="1"]; by default the child_count is disabled (show_child_count="0"); If show_child_count="1", but count of subpages=0, than child count is not showing;
  • child_count_template - if you want to specify the template of child_count you can use this shortcode: [pagelist_ext show_child_count="1" child_count_template="Subpages: %child_count%"]; by default child_count_template="Subpages: %child_count%";
  • show_meta_key - if you want to show meta key you can use this shortcode: [pagelist_ext show_meta_key="your_meta_key"]; by default the show_meta_key is empty (show_meta_key=""); If show_meta_key is enabled, but meta_value is empty, than meta_key is not showing;
  • meta_template - if you want to specify the template of meta you can use this shortcode: [pagelist_ext show_meta_key="your_meta_key" meta_template="Meta: %meta%"]; by default meta_template="%meta%";

470 comments on “Page-list

  1. Hello
    and thanks for the great plugin!

    I am trying to build a breadcrumbs navigation where every crumb lists the alternative pages for its respective level of the trail in a dropdown menu (example: http://us.battle.net/wow/en/profession/cooking).

    The dropdowns aren't a problem but is there any way to GENERALLY list the 'parent' level and the 'grandparent' level of the current '(grand) child' page? Alternativly, when setting [pagelist depth="3"], is there a way of excluding levels 1+2?

    Thanks in advance!

  2. How can I add a link to home page (which contains posts) on top of the sitemap generated by [pagelist] shortcode?

  3. Pingback: Preparing Your Blog to eBook Categories

  4. I use Page List plugin, I like it, But I want to make page list Horizontal but this plugin show all list vertical. How can I resolve this Issue?

    • webvitaly Post author

      You can fix it with css.


      .page-list .page_item {
      display: inline;
      }

  5. Pingback: Listar las subpaginas en una pagina de WordPress | Dejense ver

    • webvitaly Post author

      The problem is not in the Page-List plugin. The problem is in description tag and you are trying to be very SEO-friendly :)

      You are putting whole page content to meta description tag and WordPress is executing [page-list] shortcode in meta description tag too. That is why you have 2 lists of pages.
      You can easily remove meta description tag because nobody use it for many years.

      • Thanks. Yoast plugin disabled and seems to have sorted the description issue. Now to try and find issue with that plugin. Thanks.

  6. On this page http://homesbyreliant.com/new-communities.html I have your plugin setup as
    [pagelist_ext show_first_image="1" image_width="150" image_height="150"]

    My question is there a way so the shortcode from the WordPress Post Tabs plugin does not display in the text ouput?

    Instead of reading

    "[tab:Community Info] Reliant Homes lends their..."

    Have it read (no shortcode in the content text)?
    "Reliant Homes lends their..."

    thanks,
    R.F.

    • webvitaly Post author

      Try to use this param and add it to your previous params - [pagelist_ext strip_shortcodes="0"]

      • Thanks for the help.

        This is what I put in
        [pagelist_ext show_first_image="1" image_width="150" image_height="150" strip_shortcodes="0"]

        The same problem occurs.

        • webvitaly Post author

          try this one: [pagelist_ext show_first_image="1" image_width="150" image_height="150" strip_shortcodes="1"]

          • I tried that with the same outcome. In case this helps: When I try other shortcodes, like contact form 7, it does not show... just the GT Tabs plugin shortcode.

            • I solved the problem by turning on the excerpts functionality in my theme by placing this line of code in my functions.php.

              add_post_type_support( 'page', 'excerpt');

              Thanks for your quick responses and support.

  7. Is there a short code we can use to show a list of all posts? Right now I see only pages show up in the sitemap we created using the plugin.

  8. I use this plugin extensively on most sites I do, it is invaluable.

    I'm curious why there is not depth="" parameter for pagelist_ext (it seems implied where the parent="" parameter is described). I've got a site where the content owners create ridiculously deep page structures, and typically I want a pagelist with a depth of 1 or (usually 1). I've gotten around it by using parent="XX" where "XX" is the page above the ones I want (rather than having to use a bunch of excludes)

    Thanks

    • webvitaly Post author

      The answer is simple.
      Shortcodes [pagelist], [subpages], [siblings] are based on wp_list_pages() function which have depth param.
      Shortcode [pagelist_ext] is based on get_pages() function which have not depth param.
      I do not know why WordPress developers decided to have this set of params, but I cannot extend it easily.

        • webvitaly Post author

          Yes, you are right, thank you for reminding about it.
          parent="this"; child_of="this"; exclude="this"; child_of="parent" and so on work for [pagelist_ext] shortcode too.
          I will add this to documentation during next plugin update.

    • webvitaly Post author

      I did not understood what exactly you are trying to do.
      Can you explain what you are trying to do with more details?

      • I can't seem to access your plugin from the back end of wordpress. Where do I actually edit the links or menu items? I can't seem to find it anywhere on the dashboard of my wordpress site. I just want to be able to edit it and yet there seems to be no way to do this?

        • webvitaly Post author

          There is no admin section for Page-list plugin.
          You can change the behavior of the shortcode with shortcode options.
          The [subpages] shortcode shows all subpages to the current page automatically.

  9. Mike Mosley

    When using "include" (example... [pagelist_ext include="6,7,8"]) How is this used if the site is setup to use page names instead of id numbers? I trying to include a child page from a different parent page.

    • webvitaly Post author

      Shortcode works the same even if you have url based on page names.
      Where you can get the id of needed page: go to that page while being logged in and press link 'Edit' in the top admin bar.
      Link should be something like this: site.com/wp-admin/post.php?post=777&action=edit - the id of the page here is '777'.

  10. Pingback: Wordpress | Pearltrees

  11. This is such a great plugin - thank you so much. I just wish there was a way to force images to be resized to fit within the pagelib-ext view rather than just cropping the central part of the image. Most of my images are banner-shaped and so they don't look great in the automatically generated lists.

    Any ideas on how I could accomplish this?

  12. Wanting to use pagelist for a site map page, and I like it -- except that I can't seem to include custom post types. I tried using [pagelist_ext post_type="committee"] but it returned no results.

    • webvitaly Post author

      Page-list plugin works only with pages. post_type param does not work properly.

      • Ok. I tried adding a filter to my functions.php file, but that wasn't really successful, either.

        Stinks.

    • webvitaly Post author

      no, it is not possible to show all meta_keys and you can show only 1 meta_key

  13. hi there,

    can you explain how can we show the date using [pagelist_ext]?
    What piece of code do i have to add.

    thanks

    • webvitaly Post author

      There is no possibility to show date in the [pagelist_ext] shortcode.

    • webvitaly Post author

      There is no ability to sort pages by description. For sorting options check out 'sort_column' param on docs page.
      'desc' here means 'descending' and not 'description'.

Submit comment

Allowed HTML tags: <a href="http://google.com">google</a> <strong>bold</strong> <em>emphasized</em> <code>code</code> <blockquote>
quote
</blockquote>

Copy this code

and paste it here *