Is it possible to determine whether a page is a page template by page_id in ajax call?
To get the page template of an arbitrary page by ID you can use get_page_template_slug(): // Set $page_id somehow, probably getting it from AJAX request. $template = get_page_template_slug( $page_id ); if ( $template === ‘templates/about.php’ ) { // Do something. }