apply_filters( 'wp_list_pages', string $output, array $parsed_args, WP_Post[] $pages )

Filters the HTML output of the pages to list.


Description

Top ↑

See also


Top ↑

Parameters

$output string
HTML output of the pages list.
$parsed_args array
An array of page-listing arguments. See wp_list_pages() for information on accepted arguments.
More Arguments from wp_list_pages( ... $args ) Array or string of arguments to generate a list of pages. See get_pages() for additional arguments.
  • child_ofint
    Display only the sub-pages of a single page by ID. Default 0 (all pages).
  • authorsstring
    Comma-separated list of author IDs. Default empty (all authors).
  • date_formatstring
    PHP date format to use for the listed pages. Relies on the 'show_date' parameter.
    Default is the value of 'date_format' option.
  • depthint
    Number of levels in the hierarchy of pages to include in the generated list.
    Accepts -1 (any depth), 0 (all pages), 1 (top-level pages only), and n (pages to the given n depth). Default 0.
  • echobool
    Whether or not to echo the list of pages. Default true.
  • excludestring
    Comma-separated list of page IDs to exclude.
  • includearray
    Comma-separated list of page IDs to include.
  • link_afterstring
    Text or HTML to follow the page link label. Default null.
  • link_beforestring
    Text or HTML to precede the page link label. Default null.
  • post_typestring
    Post type to query for. Default 'page'.
  • post_statusstring|array
    Comma-separated list or array of post statuses to include. Default 'publish'.
  • show_datestring
    Whether to display the page publish or modified date for each page. Accepts 'modified' or any other value. An empty value hides the date.
  • sort_columnstring
    Comma-separated list of column names to sort the pages by. Accepts 'post_author', 'post_date', 'post_title', 'post_name', 'post_modified', 'post_modified_gmt', 'menu_order', 'post_parent', 'ID', 'rand', or 'comment_count'. Default 'post_title'.
  • title_listring
    List heading. Passing a null or empty value will result in no heading, and the list will not be wrapped with unordered list <ul> tags. Default 'Pages'.
  • item_spacingstring
    Whether to preserve whitespace within the menu's HTML. Accepts 'preserve' or 'discard'.
    Default 'preserve'.
  • walkerWalker
    Walker instance to use for listing pages. Default empty which results in a Walker_Page instance being used.
$pages WP_Post[]
Array of the page objects.

Top ↑

Source

File: wp-includes/post-template.php. View all references

$html = apply_filters( 'wp_list_pages', $output, $parsed_args, $pages );


Top ↑

Changelog

Changelog
Version Description
4.4.0 $pages added as arguments.
1.5.1 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.