Putting content into header.php without using wp_head
I am building a plugin. I have to output certain stuff in the header.php file of the theme depending on if/else I will write. However I am not at that point yet. I just learned in order to push the function into header.php I have to use wp_head
. Unfortuatenly when I do this I get a lot of extra stuff processed by WordPress jammed into the wp_head
function.
meta name='robots' content='noindex,follow' /
script type="text/javascript"
window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/zachis.it\/client\/wgp-master\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.4.2"}};
!function(a,b,c){function d(a){var c,d=b.createElement("canvas"),e=d.getContextd.getContext("2d"),f=String.fromCharCode;return ee.fillText?(e.textBaseline="top",e.font="600 32px Arial","flag"===a?(e.fillText(f(55356,56806,55356,56826),0,0),d.toDataURL().length3e3):"diversity"===a?(e.fillText(f(55356,57221),0,0),c=e.getImageData(16,16,1,1).data.toString(),e.fillText(f(55356,57221,55356,57343),0,0),c!==e.getImageData(16,16,1,1).data.toString()):("simple"===a?e.fillText(f(55357,56835),0,0):e.fillText(f(55356,57135),0,0),0!==e.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag"),unicode8:d("unicode8"),diversity:d("diversity")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simplec.supports.flagc.supports.unicode8c.supports.diversity||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyStatec.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemojif.twemoji(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);
/script
style type="text/css"
img.wp-smiley,
img.emoji {
display: inline !important;
border: none !important;
box-shadow: none !important;
height: 1em !important;
width: 1em !important;
margin: 0 .07em !important;
vertical-align: -0.1em !important;
background: none !important;
padding: 0 !important;
}
/style
link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600#038;subset=latin%2Clatin-ext#038;ver=4.4.2' type='text/css' media='all' /
link rel='stylesheet' id='dashicons-css' href='http://zachis.it/client/wgp-master/wp-includes/css/dashicons.min.css?ver=4.4.2' type='text/css' media='all' /
link rel='stylesheet' id='admin-bar-css' href='http://zachis.it/client/wgp-master/wp-includes/css/admin-bar.min.css?ver=4.4.2' type='text/css' media='all' /
link rel='https://api.w.org/' href='http://zachis.it/client/wgp-master/wp-json/' /
link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://zachis.it/client/wgp-master/xmlrpc.php?rsd" /
link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://zachis.it/client/wgp-master/wp-includes/wlwmanifest.xml" /
meta name="generator" content="WordPress 4.4.2" /
teststyle type="text/css" media="print"#wpadminbar { display:none; }/style
style type="text/css" media="screen"
html { margin-top: 32px !important; }
* html body { margin-top: 32px !important; }
@media screen and ( max-width: 782px ) {
html { margin-top: 46px !important; }
* html body { margin-top: 46px !important; }
}
/style
Is there another way to post variables from a plugin into the header.php without using wp_head
?