Hi guys, I’ve now got filtering by categories and tags working with the code edit to the plugin Tom references in a couple of other threads.
My question now is if it’s possible to query more than one post ID in a filter snippet? I have a number of lists I would like to filter in the same way (by category within the WP Show Posts list settings) and then via the same tag in the filter – is this the only way I can add multiple lists to the same snippet?
add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
if ( 123 === $settings['list_id'] ) {
$args['tag'] = 'post-tag';
}
if ( 456 === $settings['list_id'] ) {
$args['tag'] = 'post-tag';
}
return $args;
}, 10, 2 );
Thanks for the help
Greg