Advanced Iframe ProPage-listDonateGitHub
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"]
where4
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"]
whereexclude
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"]
whereexclude_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"]
whereinclude
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 forshow_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 aremenu_order
andpost_title
(sort_column="menu_order, post_title"); you can use this values forsort_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 isasc
(sort_order="asc"); you can use this values forsort_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 theHTML
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 theHTML
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]:
- 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"]
where4
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"]
where4
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 forsort_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 aresort_column
andpost_title
(sort_column="menu_order, post_title"); you can use this values forsort_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"]
whereexclude
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"]
whereexclude_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"]
whereinclude
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%";
How do you add the more link than?
There is no more-link in the Pagelist plugin.
More-link is bad for SEO and usability.
It is a fantastic plugin, I'm very happy that I found. Thank you!
I am glad that Pagelist plugin helped you.
Yes it helps me a lot, I love this plugin.Thanks
Use the theme Evolution from elegantthemes.com. I did update to the latest version of the theme and not working [pagelist_ext show_first_image="1" image_width="125" image_height="125"]. Now I show large size images, I can not set to display images to the size you want. How can I solve this problem?
I know that the theme is blamed for this problem... continue to use plugin.
If images are shown as big now, than you can limit their size by css.
Try to add this code to your theme stle.css:
.page-list-ext .page-list-ext-item .page-list-ext-image img {width:125px;}
Thanks for the help! Now go well.
I'd like to recommend that the following information from the get_pages documentation be added to the pagelist plugin documentation:
If using the parent="777" parameter, the child_of=777" parameter is also required.
As long as the parent page is the current page, then pagelist_ext works as expected. But if you try to use the parent parameter on any page, it will not work without the child_of parameter.
https://codex.wordpress.org/Function_Reference/get_pages
Love the plugin. But have some problems though.
On most pages the [siblings] and [subpages] shortcodes work fine. On other pages it shows none or too little, like on this page: http://www.cityz.nl/new-york/wijken/lower-east-side/. The page has 16 siblings but shows only one. The same for its parent, which also lists only one subpage.
Can you help me out? Thanks!
As I can see, you are using [subpages] shortcode on this page. Maybe there is no subpages except the "Wijken"?
Hi Vitaly,
Thanks for your reply. Guess I wasn't quite clear. It's not the menu on top, but I use the plugin in the left column to show subpages to the current page.
That specific page has 16 subpages, all the items in the middle column to be exact. Only one shows: "Lower East Side".
I really don't have a clue!
Geert
1) What shortcode are you using?
2) What do you need to show?
The "..../wijken/" page needs to show subpages, and I'm using the [subpages] shortcode. The "....wijken/lower-east-side/" page needs to show its siblings and the current page, and I'm using the [siblings] shortcode.
The plugin works great on numerous other pages, like http://www.cityz.nl/new-york/bezienswaardigheden/ with [subpages] and http://www.cityz.nl/new-york/bezienswaardigheden/brooklyn-bridge/ with [siblings]...
Maybe it would be easier for you to use this shortcode [pagelist child_of="777"] (where "777" is the id of the "wijken" page). This shortcode should work on each page of the site.
[pagelist child_of] doesn't work either, and using other code snippets to generate a list of subpages or siblings gives the same problem. It's driving me nuts....
Is there a way to specify multiple child pages using the extended page list? For example: [pagelist_ext child_of="1,2,3,4,5"}
IMHO it is not possible.
Hey thanks for the 3.8 update.
I hacked the previous version to fix an issue I had with [pagelist_ext]. Was reluctant to update because it would mean hack it again…
Was pleasantly surprised that it now works exactly the way I wanted it to.
Great Job!
You're welcome.
In version 3.8 there were only changed default behavior of [pagelist_ext] shortcode without params. Now if there is no subpages - [pagelist_ext] will show all pages of the site. It was made because many users saw empty page and did not know what to do :)
What exactly you added to the code? It is just interesting to me, maybe it will be useful for other users too.
Don't forget to change the version of your hacked Page-list plugin to "100" for avoiding updates and losing your code.
Hi,
I'm having a bit of trouble using multiple parameters with this plugin.
If I use this shortcode: [pagelist child_of="626"], the plugin correctly displays all child pages (there are 29 children of id=626).
If I add the number parameter, [pagelist child_of="626" number="5"], it displays no pages.
(For what it's worth, if I do this: [pagelist number="5"], it does display 5 pages, just not the pages I want.)
Also, if I use pagelist_ext instead, the child_of and number parameters work together as expected. (I'd rather use pagelist because its output is an unordered list, but can make pagelist_ext work if it's my only choice.)
Any suggestions?
Number parameter currently does not work because of bug. Maybe it will be fixed in future versions.
A WordPress bug, huh? Pity.
Thanks for your prompt reply.
how can i keep read more like my page
http://www.nepaltrekkingpass.com/tour-in-nepal.php
I am using your plugin for my new site
There is no more-link in the Pagelist plugin, because more-link is bad for SEO and Usability.
This is very nice plug-in. Thank you for all of your hard work.
Is it possible to make pagelist_ext show the default thumbnail size as specified in the media settings or functions.php?
set_post_thumbnail_size( 150, 150 );
If not, that might make a nice future enhancement.
Page list plugin does not get default media settings. Maybe it will be in future releases.
Any way to combine the features of [pagelist] and [pagelist_ext] to present a pretty list which is indented (a tree)?
The HTML produced by [pagelist_ext] is not hierarchical at all, and there isn't much I can do in CSS to tell the pages apart from a depth perspective. Either having classes (eg depth-1, depth-2), or optionally wrapping in ul/li, or nesting in divs... etc. Thoughts?
[pagelist_ext] does not have hierarchical feature;
If you want, you may rewrite the code for your needs but change the plugin version for "100" for skip plugin updated and losing your code;
WordPress 3.4.1
[pagelist] 3.7
[pagelist_ext] does not appear to work with WordPress version 3.4.1.
Any word on when an update will be available?
Pagelist plugins works with WordPress 3.4.1 good.
Do you have subpages to the page, on which you are using
[pagelist_ext]
shortcode?No, there are no subpages. I have several pages on the site with no parent.
I simply inserted [pagelist_ext] into a new page. The page came up blank. I did not check the source for actual output though.
That's ok.
Try something like this [pagelist_ext child_of="0"]
I created [pagelist_ext] shortcode for showing like "Product-pages" and there is no need to show all pages of the site, only subpages.
[pagelist] was created to show sitemap by default.
Ah, there we go. Looks good now.
Thanks for your help!
Is it possible to use [pagelist] with custom post types?
I don't know for sure if it will work with custom post types. You may try it with such shortcode [pagelist post_type="custom"] but add the name of your post type.
Hmm.. neither that nor [pagelist_ext post_type="custom"] seem to work. Curses!
Hi,
I'd like to put a page tree in my 404.php
But since i can't use the shortcode there can you tell me if, and how, this is possible?
Kind regards,
Benno
Try to add to your 404.php file this php code:
echo do_shortcode('[pagelist]');
That seems to work. Thanks!! :)
Hi, thx for the sitemap plugin. Can I use it to also display my posts within the sitemap ?
Regards,
Frank
To show list of posts you can use List Category Posts plugin
http://paolinevn.org/jclubnu/games/
I want to separate the hierarchy by css, giving it a little space and font style. How do I do that? Thank you for a great plugin.
There are classes added to template by the plugin and you can use them:
ul.page-list {margin-bottom:20px;}
ul.page-list li {}
ul.page-list ul.children {margin-bottom:20px;}
ul.page-list ul.children li {}
Thank you.
IS there a way for pagelist_ext to display the pages by date? When I do sort_order="desc", I thought it would display in descending order according to publish date but it goes by alphabetical.
Try this:
[pagelist_ext sort_order="desc" sort_column="post_date"]
or this:
[pagelist_ext sort_order="desc" sort_column="post_modified"]
How do you add the more link than?
There is no ability to add "more-link". "more-link" is not good for seo and for usability.
actually im a SEO specialist. have been working in the industry for years for brands all around the world.
More text, is an extremely common precursor for surfers to follow on, and while you may not think its great for usability compared to inline links, unfortunately your wrong.
Its called a call to action (event though its not the best one).
Usually I recommend read more on: [link and anchor text to content] rather then expecting the user to click on the heading to navigate. especially because most heading tags h1 h2 h3 have their underline link removed (which is a common surfer association. Underline = link)
SEO: How many people are searching with word "more"?
Usability: There is already link in the header and there is no need to duplicate it.
"It is common": "more-link" is a bad habit, which become a rule. Some time ago "font-tag" was a rule too.
"more-link" does not give any context to users, search engines or screen readers.
W3C about links without context.
Which way is better?
Is there any reason why the pagelist_ext didn't show the date but the subpages or pagelist did?
Or maybe the problem is on my side and i can't get this!
Thanks,
[pagelist_ext] does not show date at the moment and it is based on get_pages() function;
[subpages] or [pagelist] show date already because they are based on wp_list_pages() function;
Thanks, i'll use the get_pages function instead, i'll be able to get the date with the id. Thanks for your plugin, it is really helpful, i use it for my widgets :)
How had you solved this? Sorry my bad english.