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?
Share Improve this question asked Nov 24, 2018 at 12:14 joq3joq3 3813 silver badges21 bronze badges 4- Do you have anything custom hooked into wp_head on that template? – Jacob Peattie Commented Nov 24, 2018 at 12:34
- Nothing, just searched through my complete theme folder. – joq3 Commented Nov 24, 2018 at 12:37
- Scripts are enqueued on wp_head remember. – Jacob Peattie Commented Nov 24, 2018 at 12:47
- Tried removing all the enqueue scripts from the theme, no change. – joq3 Commented Nov 24, 2018 at 12:54
1 Answer
Reset to default -1you can try this way:
<?php get_header('your_custom_header');?>
<?php get_footer('your_custom_footer');?>