Home › Forums › Pro Support › Query two post IDs in one add_filter? › Reply To: Query two post IDs in one add_filter?
May 25, 2020 at 5:13 pm
#15931
Keymaster
Might be easier to do this:
add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
$ids = array(
123,
456,
789,
);
if ( in_array( $settings['list_id'], $ids ) ) {
$args['tag'] = 'post-tag';
}
return $args;
}, 10, 2 );