We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Combine Conditions Reply To: Combine Conditions

#18529
Tom
Keymaster

You can find them here: https://github.com/tomusborne/wp-show-posts/blob/master/wp-show-posts.php#L97-L145

This is the line that needs updating in the current version: https://github.com/tomusborne/wp-show-posts/blob/master/wp-show-posts.php#L383

It needs to look like this: https://github.com/tomusborne/wp-show-posts/blob/release/1.2/wp-show-posts.php#L391

Then we use this filter:

add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
    if ( 123 === $settings['list_id'] ) {
        $args['category__and'] = 8;
        $args['tag__in] = 68;
    }

    return $args;
}, 10, 2 );

You just need to update the 123 with the ID of the list.