{"id":1276,"date":"2014-09-25T10:46:28","date_gmt":"2014-09-25T10:46:28","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=1276"},"modified":"2022-02-17T07:14:02","modified_gmt":"2022-02-17T07:14:02","slug":"add-your-own-header-into-header-php","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/wordpress\/themes-wordpress\/child-themes\/add-your-own-header-into-header-php","title":{"rendered":"Add your own header into header.php"},"content":{"rendered":"<p>\nTo avoid needing to copy the header.php file into your child theme and customize it you can use a function in your child theme functions.php file instead:\n<\/p>\n<pre>\r\n<code>\r\nadd_action(&#39;wp_head&#39;, &#39;my_custom_header&#39;);\r\nfunction my_custom_header(){\r\n    \/\/Close PHP tags \r\n    ?&gt;\r\n    ADD YOUR PLAIN HTML CODE HERE\r\n    &lt;?php \/\/Open PHP tags\r\n}\r\n<\/code><\/pre>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To avoid needing to copy the header.php file into your child theme and customize it you can use a function in your child theme functions.php file instead: add_action(&#39;wp_head&#39;, &#39;my_custom_header&#39;); function my_custom_header(){ \/\/Close PHP tags ?&gt; ADD YOUR PLAIN HTML CODE HERE &lt;?php \/\/Open PHP tags } &nbsp;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[126],"tags":[],"class_list":["post-1276","post","type-post","status-publish","format-standard","hentry","category-child-themes"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=1276"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1276\/revisions"}],"predecessor-version":[{"id":1277,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/1276\/revisions\/1277"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=1276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=1276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=1276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}