Code to “noindex” Multiple Pages in WordPress

/* No Index Multiple Posts */
add_action('wp_head', 'wpflt_header_function_condition_noindex_page_multiple');
function wpflt_header_function_condition_noindex_page_multiple(){
if ( is_page( array( '3242', '3244', '3245', '3246') ) ) { ?>
<meta name="robots" content="noindex" />
<?php }
};

Here is a simple filter to add ‘noindex’ metatag to multiple pages in WordPress. Enter page IDs of the pages in Line 4. Confirm the same in the Source Code.