I have a weird issue where if I am in the Customizer and visit a page which uses a custom page template I made it doesn't load the site in the preview. But I can see that it loads in the console.
I found out that the <?php wp_head(); ?>
was the issue. If I remove this part in the site template PHP file it loads just fine. But of course it doesn't look or work right.
I use <?php wp_head(); ?>
and <?php wp_footer(); ?>
because the rest of the theme uses a different header and footer, so I don't want to call get_footer
and get_header
(also this doesn't solve the problem I am having).
Any ideas why this is happening?
I have a weird issue where if I am in the Customizer and visit a page which uses a custom page template I made it doesn't load the site in the preview. But I can see that it loads in the console.
I found out that the <?php wp_head(); ?>
was the issue. If I remove this part in the site template PHP file it loads just fine. But of course it doesn't look or work right.
I use <?php wp_head(); ?>
and <?php wp_footer(); ?>
because the rest of the theme uses a different header and footer, so I don't want to call get_footer
and get_header
(also this doesn't solve the problem I am having).
Any ideas why this is happening?
you can try this way:
<?php get_header('your_custom_header');?>
<?php get_footer('your_custom_footer');?>