List posts
wp_get_postsList posts, pages or another post type, newest first. Returns ID, title, status, excerpt and link for each, without the full content. Filter by post_type, post_status, search text, author (user ID or slug) or a date range. Returns 10 items unless limit is set; page with offset or paged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | ||
| limit | No | ||
| paged | No | ||
| author | No | Filter by author user ID. | |
| before | No | ||
| offset | No | ||
| search | No | ||
| post_type | No | ||
| author_name | No | Filter by author user slug (nicename). Ignored if author is set. | |
| post_status | No | ||
| author__not_in | No | Exclude posts by these author user IDs. |