Use of IF statement in Header file

As Maruti Mohanty mentioned you might not be using get_template_part in the correct way. The first argument is the slug name for the generic template. The second argument is the name of the specialized template. So currently your code is doing the following:

  • On the page that has the ‘custom-page’ slug, display the template part named custom-logo-top.php.
  • If that file doesn’t exist then just display the generic template part called custom-logo.php

I’d probably name your template parts ‘logo.php’ and ‘logo-custom.php’. It’s worth having a look through the Twenty Fourteen theme that comes with WordPress as well as the codex whenever you’re unsure of anything.