이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Subpage Listing

설명

Subpage Listing allows you to take full advantage of WordPress Pages’ hierarchy by generating a navigational tree of the pages below them (subpages).

For example, say you have a parent page called “Parent.” Now, say you have 3 pages under “Parent,” called “Child1,” “Child2,” and “Child3.” Now, say that you have 2 pages under “Child2” called “Grandchild1” and “Grandchild2.”

Subpage Listing would create a navigation tree for “Parent” that looks like this:

  • Child1
  • Child2
    • Grandchild1
    • Grandchild2
  • Child3

This allows you to very easily create a complex hierarchical structure that can be browsed.

Advanced Usage

Blank pages will automatically be given a navigation tree. This allows you to quickly create “container” pages (all you do is fill in a title, and choose the page’s parent.)

If you would like to insert the navigational tree manually (that is, surrounded by text of your choosing), use the “Subpage Listing” quicktag that will show up on the Write Page screen (sorry, no RTE support at this time). This will insert the tag: which will be replaced by the listing of the subpages.

Note: when inserting the tag manually, make sure that there is a blank line both above and below the tag, so as to ensure proper handling of your surrounding paragraphs by WordPress.

Version 0.6 was a massive update that added a bunch of new functionality. The ability to show the current page’s parent has been added, as well as the ability to show the current page’s siblings. You can also suppress the showing of children, and show only siblings, parents, or both. To use these features within a post, use this syntax: The first “parameter” is the depth you want to show. You can set this to 0 to suppress display of children. The second “parameter” is a boolean switch for display of the parent page. The third “parameter” is a boolean switch for display of sibling pages. All are optional, although if you want to set the second “parameter”, you also have to set the first, and if you want to set the third, you have to set all three.

There is also a new function for use in your templates. Many people wanted to show subpages or siblings in their sidebar, so now you can do that. <?php txfx_wp_subpages(); ?> is the most basic form, but it can take many parameters.

<?php txfx_wp_subpages(5, false, false, '<ul>', '</ul>', true); ?> will show 5 pages deep (first parameter), hide the parent (second parameter), hide the siblings (third parameter), wrap the whole thing in '<ul>' and '</ul>' (fourth and fifth parameters), and will echo the result (sixth parameter). These happen to be the default settings, that I have just illustrated.

설치

  1. Upload plugin-name.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Place <!--%subpages%--> in an page’s content and it will be replaced with a hierarchical list of subpages
  4. See “Advanced Usage” for more detail

후기

2022년 7월 27일
This hasn't been updated in years, so obviously it would be better to find a supported plugin to do the same thing, but if you just want to get it working in PHP8, go in to subpage-listing.php and change the last couple of lines to: // doing it this way for compatibility with the Preformatted plugin add_filter('init', function($a) { add_filter('the_content', 'txfx_wp_subpage_display', 9); }); That should fix it. create_function isn't supported in PHP8 (nor should it be... *shudder*)
모든 4 평가 읽기

기여자 & 개발자

“Subpage Listing”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Subpage Listing”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.