{"id":135,"date":"2020-10-12T20:23:28","date_gmt":"2020-10-12T18:23:28","guid":{"rendered":"http:\/\/vitocafazzo.it\/site_Wp\/?p=135"},"modified":"2021-07-10T13:14:18","modified_gmt":"2021-07-10T11:14:18","slug":"wp-004-personalizzazione-header-e-footer","status":"publish","type":"post","link":"https:\/\/vitocafazzo.it\/site_Wp\/2020\/10\/12\/wp-004-personalizzazione-header-e-footer\/","title":{"rendered":"WP 004 &#8211; Personalizzazione header e footer"},"content":{"rendered":"\n<p class=\"has-text-align-center wp-block-paragraph\"><a href=\"https:\/\/vitocafazzo.it\/site_Wp\/appunti-wordpress\/\" data-type=\"URL\" data-id=\"https:\/\/vitocafazzo.it\/site_Wp\/appunti-wordpress\/\">Torna all&#8217;elenco<strong> WordPress<\/strong><\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"120\" src=\"https:\/\/vitocafazzo.it\/site_Wp\/wp-content\/uploads\/2020\/10\/APP_Wordpress.jpg\" alt=\"\" class=\"wp-image-595\"\/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Header<\/h3>\n\n\n<p>Per la gestione personalizzata dell&#8217;header bisogna creare il file <strong>header.php<\/strong> da inserire nella cartella del tema. L&#8217;header \u00e8 stato modificato in modo da contenere anche una barra per il menu. Di seguito la modifica al contenuto del file <strong>header.php<\/strong>&nbsp;e la porzione di codice relativo alle istruzioni CSS da inserire nel file&nbsp;<strong>style.css<\/strong><\/p>\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:php decode:true \" title=\"Frammento di codice: header.php\">&lt;header role=\"banner\"&gt;\n     &lt;div class=\"my_header\"&gt; \t\n           &lt;p style=\"text-align:center; border:1px solid black\"&gt;&lt;img src=\"http:\/\/vitocafazzo.it\/site_Wp\/wp-content\/uploads\/2020\/10\/logo.png\"&gt;&lt;\/p&gt;\n     &lt;\/div&gt;\n     &lt;div class=\"my_menuBar\"&gt; \n        &lt;form id=\"searchform\" method=\"get\" action=\"&lt;?php echo esc_url( home_url( '\/' ) ); ?&gt;\"&gt;\n            &amp;nbsp|&amp;nbsp\n            &lt;a href=\"http:\/\/vitocafazzo.it\/site_Wp\/appunti\/\" style=\"color:#FF6600;\"&gt; Appunti &lt;\/a&gt;\n            &amp;nbsp|&amp;nbsp\n            &lt;a href=\"http:\/\/vitocafazzo.it\/site_Wp\/personali\" style=\"color:#FF6600;\"&gt; Personali &lt;\/a&gt;\n            &amp;nbsp|&amp;nbsp \n            &lt;input style=\"background-color: #21384D; color:white\" type=\"text\" class=\"search-field\" name=\"s\" placeholder=\"Ricerca per....\" value=\"&lt;?php echo get_search_query(); ?&gt;\"&gt;\n            &lt;input style=\"background-color: #21384D; color:#FF6600\" type=\"submit\" value=\"Cerca\"&gt;\n            &amp;nbsp|&amp;nbsp \n        &lt;\/form&gt;\n     &lt;\/div&gt;\n&lt;\/header&gt;\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:css decode:true \" title=\"stile.css\">.my_header {\n\tbackground:#000000 url(http:\/\/vitocafazzo.it\/site_Wp\/wp-content\/uploads\/2020\/10\/sfondoJoy.jpg) repeat-x bottom center;\n\twidth: 100%;\n\theight: auto;\n\tz-index: 999999;\n}\n\n.my_menuBar { \n    width: 100%;\n    margin-top:-16px;\n    padding-top: 5px;\n    padding-bottom: 5px;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tbackground: #162635;\n\tcolor: White;\n\ttext-align:center;\n\tfont-size:14px;\n\tborder:0 solid #000; \n\tz-index: 999999;\n}<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Footer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Per la gestione personalizzata del footer bisogna creare il file <strong>footer.php<\/strong> da inserire nella cartella del tema. Ho pensato ad un footer semplice contenente i link all&#8217; <em>Informativa estesa sull&#8217;uso dei cookie<\/em>&nbsp;e alle &nbsp;<em>Note legali<\/em>, ancorato in fondo alla pagina. Di seguito il contenuto del file <strong>footer.php<\/strong> e la porzione di codice relativo alle istruzioni CSS da inserire nel file <strong>style.css<\/strong><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:php decode:true \" title=\"footer.php\">&lt;?php\n\/**\n * The template for displaying the footer.\n *\n * Contains the closing of the #content div and all content after\n *\n * @package Digital Agency Lite\n *\/\n?&gt;\n\n    \t&lt;div class=\"my_footer\"&gt;\n    \t\t&lt;a   href=\"..\/informativa.html\" target=\"_blank\" style=\"color:#FF6600;\"&gt;Informativa estesa sull'uso dei cookie&lt;\/a&gt;\n    \t\t\t-\n    \t\t&lt;a   href=\"..\/notelegali.html\" target=\"_blank\" style=\"color:#FF6600;\"&gt;Note legali&lt;\/a&gt;\n    \t&lt;\/div&gt;\n\t\n  \n        &lt;?php wp_footer(); ?&gt;\n\n    &lt;\/body&gt;\n&lt;\/html&gt;<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:css decode:true \" title=\"stile.css\">.my_footer {\n    clear: both;\n    height: 30px;\n    width: 100%;\n    padding-top: 5px;\n    position: fixed;\n    text-align:center;\n    background: #162635;\n    font-size:14px;\n    bottom: 0;\n    left: 0;\n    z-index: 999999;\n}<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Torna all&#8217;elenco WordPress Header Per la gestione personalizzata dell&#8217;header bisogna creare il file header.php da inserire nella cartella del tema. L&#8217;header \u00e8 stato modificato in modo da contenere anche una barra per il menu. Di seguito la modifica al contenuto del file header.php&nbsp;e la porzione di codice relativo alle istruzioni CSS da inserire nel file&nbsp;style.css [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":5,"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":1396,"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/posts\/135\/revisions\/1396"}],"wp:attachment":[{"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vitocafazzo.it\/site_Wp\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}