/* No Index Multiple Posts */
add_action('wp_head', 'wpflt_header_function_condition_noindex_post_multiple');
function wpflt_header_function_condition_noindex_post_multiple(){
if ( is_single( array( '3241', '3243') ) ) { ?>
<meta name="robots" content="noindex" />
<?php }
};
Here is a simple filter to add ‘noindex’ metatag to multiple posts in WordPress. Enter post ID of the specific posts in Line 4. Confirm the same in the Source Code.