Filters the SQL WHERE clause for retrieving archives.
Parameters
$sql_where
string- Portion of SQL query containing the WHERE clause.
$parsed_args
array- An array of default arguments.
Source
$where = apply_filters( 'getarchives_where', $sql_where, $parsed_args );
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |
The example of modifying a current query and add your own category id to filter:
Read https://developer.wordpress.org/reference/functions/wp_get_archives/ to see what it should be work together.