admin管理员组文章数量:1130349
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');?>
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');?>
本文标签: phpwphead makes my custom page template not work in Customizer
版权声明:本文标题:php - wp_head makes my custom page template not work in Customizer? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749153809a2324269.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论