{"id":52707,"date":"2015-08-24T06:58:34","date_gmt":"2015-08-24T10:58:34","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=52707"},"modified":"2017-08-24T05:37:41","modified_gmt":"2017-08-24T09:37:41","slug":"magento-how-to-add-a-new-static-block-to-the-headerfooter-section","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/magento-how-to-add-a-new-static-block-to-the-headerfooter-section.html","title":{"rendered":"Magento. How to add a new static block to the header\/footer section"},"content":{"rendered":"<p>\r\n<p>In this tutorial you will learn how to add a static block to the header\/footer section in Magento.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=IkBiyvxn0zM?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to add a new static block to the header\/footer section<\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>Log into your Magento Admin panel and navigate to <strong>CMS -> Static Blocks<\/strong><\/p>\r\n<p>.<\/li>\r\n<li>\r\n<p>Click on <strong>Add New Block<\/strong> button:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_1-300x210.jpg\" alt=\"magento_how_to_add_a_new_static_block_to_the_Header_Section_1\" width=\"300\" height=\"210\" class=\"aligncenter size-medium wp-image-52708\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_1-300x210.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_1-150x105.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_1.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Specify your <strong>Block Title<\/strong> and <strong>Block Identifier<\/strong>.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Remember or copy your <strong>Identifier<\/strong>.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Select the store view for which you want to add this <strong>Static block<\/strong> and alter the <strong>Content Field<\/strong>:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_2-300x210.jpg\" alt=\"magento_how_to_add_a_new_static_block_to_the_Header_Section_2\" width=\"300\" height=\"210\" class=\"aligncenter size-medium wp-image-52709\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_2-300x210.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_2-150x105.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_2.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<\/li>\r\n<li>\r\n<p>Using your FTP client or any FileManager, navigate to <strong>app\\design\\frontend\\default\\themeXXX\\template\\page\\html<\/strong> folder.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Open <strong>header.phtml<\/strong> file using any text editor.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Depending on where exactly you wish to place your Static Block, paste the following code:<\/p>\r\n<pre class=\"brush:xml\">&lt;?php echo $this-&gt;getLayout()-&gt;createBlock('cms\/block')-&gt;setBlockId('custom_block_id')-&gt;toHtml() ?&gt; <\/pre>\r\n<p>where <strong>custom_block_id<\/strong> is your identifier which you&#8217;ve indicated when creating the Static Block:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_3.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_3-300x210.jpg\" alt=\"magento_how_to_add_a_new_static_block_to_the_Header_Section_3\" width=\"300\" height=\"210\" class=\"aligncenter size-medium wp-image-52710\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_3-300x210.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_3-150x105.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/08\/magento_how_to_add_a_new_static_block_to_the_Header_Section_3.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<li>\r\n<p>Save this file and upload to the server.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Reload your site to see the changes.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Thank you for reading this tutorial. Now you know how to add a static block to the header section in Magento.<\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/service-center\/\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-2-(835-x100).jpg\"\/>\r\n<\/a>\r\n<\/div>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=IkBiyvxn0zM?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to add a new static block to the header\/footer section<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>In this tutorial you will learn how to add a static block to the header\/footer section in Magento.<\/p>\n","protected":false},"author":12,"featured_media":52713,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[729],"tags":[1158,618,657,627,2407,693],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/52707"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=52707"}],"version-history":[{"count":2,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/52707\/revisions"}],"predecessor-version":[{"id":82961,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/52707\/revisions\/82961"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/52713"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=52707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=52707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=52707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}