Title: dashboard_recent_posts_query_args
Published: April 23, 2015
Last modified: April 28, 2025

---

# apply_filters( ‘dashboard_recent_posts_query_args’, array $query_args )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#wp--skip-link--target)

Filters the query arguments used for the Recent Posts widget.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#parameters)󠁿

 `$query_args`array

The arguments passed to [WP_Query](https://developer.wordpress.org/reference/classes/wp_query/)
to produce the list of posts.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#source)󠁿

    ```php
    $query_args = apply_filters( 'dashboard_recent_posts_query_args', $query_args );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/dashboard.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/dashboard.php#L996)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/dashboard.php#L996-L996)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_dashboard_recent_posts()](https://developer.wordpress.org/reference/functions/wp_dashboard_recent_posts/)`wp-admin/includes/dashboard.php` |

Generates Publishing Soon and Recently Published sections.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/dashboard_recent_posts_query_args/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.2.0](https://developer.wordpress.org/reference/since/4.2.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fdashboard_recent_posts_query_args%2F)
before being able to contribute a note or feedback.