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%";
Hi there, great plugin.
Running into one problem though: I can't get image_width to work with the pagelist_ext shortcode. Whatever image_width or image_height I specify, it keeps outputting a 50x50 thumb (i.e. the original 150x150 featured image thumb downsized in the html).
BTW, a suggestion: it should have a mode in which it just outputs the default thumbnail size (e.g. 150x150 or whatever it is in my theme). Right now if its hardcoded in the HTML it is more difficult to do manipulate through CSS.
Got it. One has to specify both width and height, otherwise the default value for the unspecified parameter will be kept (so I was changing a 50x50 to a 80x50 with no effect; now I have a 80x80).
Just a note: the expected behaviour would be that (just as in HTML) the image is proportionally scaled to the given value even if you only specify one of either width or height. This is what got me confused.
I know, [pagelist_ext] have little strange behaviour now about image thumbs. It is now in testing mode and it will be fixed in future releases. Thank you for your feedback.
I had the same problem copying and changing the ~image_width=”40″~ until I noticed that the end ~″~ should be an ~"~
Copy the ~image_width="80"~ instead or type it manually.
Hope that helps! :)
Thanks for feedback.
WordPress tries to texturize automatically.
I removed it and now everything is ok.
remove_filter('the_content', 'wptexturize');
remove_filter('the_title', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
[pagelist_ext] doesn't display anything for me.
by default [pagelist_ext] shows subpages to the current page.
If you dont have subpages of current page, it will show nothing.
If you want to show subpages of some other page, then try this shortcode:
[pagelist_ext child_of="7"], where "7" - is the page id, which subpages you want to show.
Thank you so much. It works perfectly! This is a great plugin!!!
Another cool addition would be to add the feature for count of subpages. It can be done just by adding $count_page_list_sub = count(get_pages("child_of=".$page->ID));
I have added it in manually, but I am not sure how to get the code to work as an if statement to add the feature in shortcode. I just added .''.$count_page_list.'. to the output of $list_pages_html for now. It is a hack, but it works. I am using this same sort of code to add custom fields with advanced custom fields.
Added in new version 1.9. You may use like this:
[pagelist_ext show_child_count="1" child_count_template="Subpages: %child_count%" show_meta_key="site" meta_template="Meta: %meta%"]
1)[pagelist_ext]: hierarchical - how it works? I don´t see any differences between hierarchical="0" and hierarchical="1"?
2) It would be possible to add parameters to [pagelist_ext] like link_before, link_after, depth?
3) and new parameter e.g. count to count of listpages?
I added some stuff to page-list.php, at line 277
$list_pages_html = '';
$no = 1;
foreach($list_pages as $page){
$link = get_permalink( $page->ID );
$list_pages_html .= 'ID.' no'.$no++.'">';
...
1) It means, that subpages will be shown under parent page (http://codex.wordpress.org/Function_Reference/get_pages)
2) pagelist_ext mainly acepts params like get_pages (http://codex.wordpress.org/Function_Reference/get_pages) function. Maybe in future it will be extended with new params, based on what will be needed;
3) I will think about it;
I was wondering if there is a way to get the [pagelist_ext] to not display images contained within the article in the list.
If we have an image leading the page it shows the image full sized and nothing else.
Thanks in advance!
Update your Page-list plugin to version 1.7 and now all html is stripped.
If you want to show html, than use this shortcode:
[pagelist_ext strip_tags="0"]
I do have a problem with the [pagelist_ext] tag. I would rather prefer using this one because I have more influence on the list appearance and also can use excerpts. However, when I use [pagelist_ext], the sidebar gets moved actually under the page contents.
This is how the page looks usually [subpages]:
http://www.thehutt.de/ha_subpages.jpg
And this is when using [pagelist_ext]. Note that the sidebar is gone (it's shown BELOW the page):
http://www.thehutt.de/ha_pagelist_ext.jpg
http://www.thehutt.de/ha_pagelist_ext1.jpg
Any way this could be fixed? Apart from this bug, this plugin seems to be just what I need.
I think that the problem with [pagelist_ext] is with CSS styles.
This is the default styles:
/* Page-list plugin styles (wordpress.org/extend/plugins/page-list/) */
.page-list-ext .page-list-ext-item {clear:both; margin:10px 0 20px 0;}
.page-list-ext .page-list-ext-image {float:left; display:inline; margin:5px 10px 10px 0;}
.page-list-ext .page-list-ext-title {clear:none;}
Try to add to your own styles.css this line of code:
body .page-list-ext .page-list-ext-item {clear:none;}
Write me back if it worked.
Does anyone know of a way to edit this so that when it lists my pages it shows the "featured image" of that page in the output as well?
You can update your plugin to version 1.5 and use this shortcode: [pagelist_ext]
This will show the list of pages with featured images.
IMHO it is hard to create universal markup, which will fit for everyone but i'll try :)
Really a great plugin!
Is there a way to show sibling pages except the current one, like [pagelist child_of="parent" exclude="current"].
Because of easy administration I won't use the page-id.?
Yes, you can use this shortcode to solve your problem:
[pagelist child_of="parent" exclude="current"]
When using exclude_tree, a comma delimited list of pages only removes the first page in the list, the rest still show up in the sitemap.
Setting all page IDs manually using the exclude parameter works, but I have 2 parent pages that will have many subpages I want to hide from the sitemap so would prefer to use exclude_tree for those 2 pages.
eg.
[pagelist exclude="427,484,425,479"] hides all pages.
[pagelist exclude_tree="427,484"] hides post 427 but shows 484.
If I swap to [pagelist exclude_tree="484,427"] then page 484 is hidden and 427 is shown.
Is there something I've overlooked in the syntax? I've rechecked the manual and examples, but still no luck.
It's a WordPress bug with exclude_tree parameter. When it will be fixed in WordPress it will start work in Page-List plugin.
Hi,
Is there a way to put code in a template as a function? I would like to place this in my template file. Thanks!
Page-list plugin is based on wp_list_pages() function,
so you can include in your template this code:
<ul>
<?php wp_list_pages('title_li='); ?>
</ul>
Aditional parameters you may find on wp_list_pages page.
just to show page? i think show post is very good. but tks very nice simple plugin..
how to show post?
Page-list plugin is not showing posts.
Whats about multilanguage? I use qtranslate in german and english. The englisch sides url looks like domain.de/news?lang=en
Is it possible to use with pagelist shortcode?
page-list plugin should work with qtranslate correctly
Yes, works fine for me! Just tested. :-)
Is there any way to publish list of subpages not in one column?
See http://www.mineralog.net/?page_id=10
Right now I upload content into site
and I expect that there will be more than 200 subpages of catalogue - to many empty place at the right of main page
Try to add this code to your style.css file:
ul.page-list {
-moz-column-count: 3;
-moz-column-gap: 20px;
-webkit-column-count: 3;
-webkit-column-gap: 20px;
column-count: 3;
column-gap: 20px;
}
It's work - http://www.mineralog.net/?page_id=10.
I had long list of subpage and want to divide into 3 or 4 column. And I already pasted the above code to style.css from folder theme, but it did not work. Please help me. Thank you in advance.
you can split thi list of pages with "number" and "offset" parameters.
Something like this:
[pagelist_ext number="5" offset="0" class="class1"] - show first 5
[pagelist_ext number="5" offset="5" class="class2"] - show second 5
And now you can style your lists like columns in css:
.class1, .class2 {float:left; width:50%;}
iwant to place in my blog, but dont know how to submit sitemapt in google webmaster tools?
this plugin is not creating sitemap for Google,
you should use google sitemap plugin.
Hi,
A good Plugin. But I want to dispaly the same kind of page list in my sidebar. If particular page has any subpages it has to display it otherwise it should display main pages. Is there any way to do it ......
sorry, but this plugin does not have widget options.
You should find another plugin for this.
Maybe I am mistaken, but I need just a simple html sitemap for my visitors to ease the access of pages. Can you tell me where can I find it? And where is the example, showing that it works? I don't see it here. Thanx, anyway.
Paste this code "[pagelist]" into your sitemap page and save it.
Then look at this page in browser.
Additional parameters ypu can find here.
I have a really simple site and am grateful for your plugin. I can't seem to 'exclude' a 'sitemap' page link on my sitepage page. Please can you advise. I have assigned a 'page order' to my sitemap page in 'page attributes' of '20', but cannot seem to exclude a page link. ([pagelist exclude="20"] Unless I need to assign the page number ID elsewhere? please help? WordPress relative newbie. Thank you
[pagelist exclude="20"] where "20" is the id of the page.
For example, here: http://www.northwhiteley.info/sitemap-2 id of the page is 219, so on this page you should use this code [pagelist exclude="219"] to exclude self "Sitemap" page.
Id of the the page you can get in admin section when you will click on edit page link and in browser address bar you can find this ID.