How to add JS script in specific pages in WordPress?
If you’re using IDs for is_page() you should pass them as integers, not strings. Otherwise WordPress is looking for pages with a slug of “3854”, not a page with that ID. So instead of: if ( is_page( array( ‘3854’, ‘253’ ) ) ) {} Use: if ( is_page( array( 3854, 253 ) ) ) {}