The is_page_template()
function is the incorrect function to use in this case as it checks against Page Templates and single.php
is just a normal template, not a page specific one, usually meant for posts.
The function you’re probably looking to use instead is is_single( $optional_posttype )
which will look for singular view of a post type, post
by default.
if( is_single() ) {
/** ... **/
}
You could also check against the basename if you really wanted to:
global $template;
$template_slug = basename( $template );
if( 'single.php' === $template_slug ) {
/** ... **/
}