Dette innstikket er ikkje testa med dei tre siste utgåvene av WordPress. Det kan henda det ikkje blir vedlikehalde lenger, og kan ha problem med nyare versjonar av WordPress.

List Children

Skildring

Use an HTML comment to list links of the current page’s children or siblings.

Common usage is for content sites utilizing WordPress as a simple CMS. Some content hierarchies call for an Overview page followed by multiple subpages, for example, a Services page.

Use the following shortcodes to list children and or siblings of the current page:

Alphabetical listing of current page’s children:

[list_children sort_column=»page_title» sort_order=»asc»]

List of current page’s siblings, ordered by menu order (descending):

[list_siblings sort_column=»menu_order» sort_order=»desc»]

You can use a majority of the attributes from the wp_list_pages() call: https://codex.wordpress.org/Function_Reference/wp_list_pages

The following will no longer work (deprecated):

<ul>
<!–list_children()–>
</ul>

Skjermbilete

Installasjon

  1. Download and unzip to the «wp-content/plugins/» directory
  2. Activate the plugin.

Vanlege spm.

Can I include the current page in the list_siblings() call?

Of course, use the following:

[list_siblings exclude_me="false"]

Omtalar

6. mai 2019
I’ve been using this tiny, very simple plugin for many years. It does not make coffee, it’s not powered by AI and it will not take you to the moon but it has listed children pages of my website for all that time and is still supported — all that for free. Thank you so much, Andy! 🙂
Les alle 2 omtalar

Bidragsytarar og utviklarar

“List Children” is open source software. The following people have contributed to this plugin.

Contributors

Endringslogg

2.0.1

  • Clean up plugin description.

2.0

  • PHP 7.4 and WordPress 5.6 support
  • Removed HTML comment support (deprecated)