List posts and pages
wp_list_postsLists WordPress posts, pages, or any post type with filters, sorting, and pagination, returning IDs, titles, slugs, links, statuses, dates, and page totals.
Instructions
List posts, pages or entries of any post type, with filters, sorting and pagination. Returns items: [{id, type, status, title, slug, link, date, modified, author, parent, excerpt, menu_order}] and pagination {page, per_page, total, total_pages}; content is not included (wp_get_post returns it). Only entries the account may read are listed; no match gives an empty list. Needs edit_posts. Read-only. wp_search runs one keyword search across all searchable post types, without paging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, starting at 1. Default 1. | |
| type | No | Post type (post, page, any, or a custom type as wp_get_post_types lists it). Default "post". Revisions are listed only with parent set to a post the account may edit. | post |
| order | No | ASC (in any letter case) or DESC; any other value counts as DESC. Default "DESC". | DESC |
| author | No | Only entries by this author user id. | |
| parent | No | Only children of this post id; 0 for top-level entries only. | |
| search | No | Keyword search in title, excerpt and content. | |
| status | No | Post status (publish, draft, pending, private, future, trash, or any: every status except trash, auto-draft and others registered as excluded from search). Default "any". | any |
| orderby | No | Sort field: date, title, modified, menu_order or ID. Default "date". | date |
| per_page | No | Items per page, 1–100; other values are clamped. Default 20. | |
| built_with | No | Only posts built with this page builder: a builder id as wp_get_post names it in built_with (e.g. "elementor", "kadence", "wpbakery"), "any" for every known builder, or "none" for posts without one. Matched by the builder's markers (meta keys, content patterns); each listed item then names the builder found on it. |