Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'get_job_listings_query_args', function( $args ) {
- $args['meta_query'][] = [
- 'relation' => 'OR',
- [
- 'key' => '_job_date',
- 'value' => date('Y-m-d'),
- 'compare' => '>=',
- 'type' => 'DATE',
- ],
- [
- 'key' => '_job_date',
- 'value' => '',
- ],
- [
- 'key' => '_job_date',
- 'compare' => 'NOT EXISTS',
- ],
- ];
- return $args;
- }, 100 );
- add_filter( 'mylisting\sections\listing-feed\args', function( $args ) {
- $args['meta_query'][] = [
- 'relation' => 'OR',
- [
- 'key' => '_job_date',
- 'value' => date('Y-m-d'),
- 'compare' => '>=',
- 'type' => 'DATE',
- ],
- [
- 'key' => '_job_date',
- 'value' => '',
- ],
- [
- 'key' => '_job_date',
- 'compare' => 'NOT EXISTS',
- ],
- ];
- return $args;
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement