admin管理员组文章数量:1435859
I'm using WordPress theme Twenty Ninteen and trying to make a travel blog with the help of travel affiliate API get from Travelpayouts.
<script charset="utf-8" src="//www.travelpayouts/widgets/920a6b8c6fc20070013d2e04f690210d.js?v=1649" async></script>
This is form code to display on pages/post, if I use on any post on page code working fine but I need to add this code in the header to display like.
I try to use the plugin for header & footer to paste the code & display but via plugin code working in the footer but in header nothing display.
I'm using WordPress theme Twenty Ninteen and trying to make a travel blog with the help of travel affiliate API get from Travelpayouts.
<script charset="utf-8" src="//www.travelpayouts/widgets/920a6b8c6fc20070013d2e04f690210d.js?v=1649" async></script>
This is form code to display on pages/post, if I use on any post on page code working fine but I need to add this code in the header to display like.
I try to use the plugin for header & footer to paste the code & display but via plugin code working in the footer but in header nothing display.
Share Improve this question asked Apr 3, 2019 at 7:50 FormaLFormaL 1035 bronze badges1 Answer
Reset to default 0You need to edit header.php
of your theme and insert the script there right after the site navigation.
I try to use the plugin for header & footer to paste the code & display but via plugin code working in the footer but in header nothing display.
Plugins fail to insert this in header because these plugins use wp-header
hook which output in <head>
tag and not in the <body>
tag, so the output is not visible.
While those plugins which uses wp_footer
hook outputs everything within <body>
tag, so the output is visible.
本文标签: Embed Form In Header
版权声明:本文标题:Embed Form In Header 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745632254a2667344.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论