Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'generateblocks_query_loop_args', function( $query_args, $attributes ) {
- if ( ! empty( $attributes['className'] ) && strpos( $attributes['className'], 'my-query-2' ) !== false ) {
- $query_args['meta_key'] = 'meta-date';
- $query_args['orderby'] = 'meta_value_num';
- }
- return $query_args;
- }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment