Change single.php template based on parent category

I don’t know what our single-XXX.php files look like, but if they include calls to get_header (and perhaps get_sidebar()and get_footer) you obviously will get the header twice as it is called again at the bottom of your first code block (and perhaps te rest of the regular page).

In the second code block you avoid outputting the header twice, because it is in the final else statement, but if there is more code below it will still be executed after the call to single-XXX.php. You should make sure the whole code of the regular single page is inside the else statement.

Otherwise, you could make a template called single-normal, place the full code there and replace the line else get_header(); in your last code block with else get_template_part('single', 'normal');.

tech