I solved this by adding the header php code, and the setting it with display none as below:
#main-header {
display:none;
}
Then using JQuery I added the following:
<script>
if(self==window.top)
{
$( "header#main-header" ).css( "display", "inherit" );
$( "div#mce_height" ).css( "margin-top", "100px" );
}
</script>
This detects if it is in an iframe, and if it’s not, it will show the header