[PR] Cleanup of single.php and parts/header.php

Avoids some errors when viewing a single post type view.