新着記事 (2)
- // Create a new filtering function that will add our where clause to the query
- function filter_where( $where = '' ) {
- // posts in the last 30 days
- return $where;
- }
-
- add_filter( 'posts_where', 'filter_where' );
- $query = new WP_Query( $query_string );
- remove_filter( 'posts_where', 'filter_where' );
-