$args = array(
'my_custom_id' => 'customidentifier' <-- something like this??
'category_name' => 'news',
'posts_per_page' => 3
);
$my_query = new WP_Query( $args );
add_action(
'pre_get_posts',
function( $wp_query_obj ) {
if ( ! empty( $wp_query_obj->query_vars['my_custom_id'] ) ) {
// ...
}
},
100,
1
);