Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Query two post IDs in one add_filter? Reply To: Query two post IDs in one add_filter?

#15931
Tom
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 );