Pahle Footer ko 5 section me baanto- Footer header (Only for add a Image widget), Footer Top (For multiple Widgets), Footer Columns(Left+ Center+Right), also look similar in layout mode, Footer Bottom(Multiple Widgets), Footer Bar(for Link List + Attribution /credits). In sabhi ko sabse pahle Parts me bant kar LAyout me saperate karna, Fir b:section add karta taki in future agar mujhe aur further sections create karne ka man ho to mai easily kar saku.

May 29, 2026 0 Comments

 ज़रूर, मैं आपकी ब्लॉगर थीम में यह बदलाव कर सकता हूँ। यह एक बेहतरीन अपग्रेड है जिससे आपका 'Layout' मोड बहुत ही व्यवस्थित (organized) दिखेगा और भविष्य में विजेट्स प्रबंधित करना आसान हो जाएगा।

जैसा कि आपने माँगा है, मैं पूरी प्रक्रिया को दो मुख्य हिस्सों में बाँट रहा हूँ:

  1. भाग 1 (CSS): यह कोड थीम के Frontend (वेबसाइट पर) और Backend ('Layout' मोड में) दोनों जगह फ़ुटर के 5 हिस्सों को सही ढंग से दिखाने के लिए ज़रूरी है।

  2. भाग 2 (XML Structure): यह वास्तविक कोड है जो आपके फ़ुटर को 5 saperate 'Sections' (b:section) में विभाजित करेगा।

महत्वपूर्ण: बदलाव करने से पहले, कृपया अपनी वर्तमान थीम का Backup ज़रूर ले लें।

भाग 1: CSS कोड (Styling)

इस कोड को आपको अपनी थीम में <b:skin>...</b:skin> के अंदर, बिल्कुल अंत में ]]> से पहले पेस्ट करना होगा।

यह कोड तीन काम करता है:

  • Frontend पर फ़ुटर को सुंदर बनाता है।

  • Columns को 3 हिस्सों में बाँटता है।

  • सबसे महत्वपूर्ण: 'Layout' मोड में इन 5 हिस्सों को अलग-अलग रंगीन बॉक्स के रूप में दिखाता है ताकि आप पहचान सकें कि कौन सा विजेट कहाँ जा रहा है।

CSS
/* --- Customized 5-Section Footer CSS --- */

/* --- 1. Frontend CSS (Live Website) --- */
#footer-wrapper {
  clear: both;
  width: 100%;
  margin: 20px auto 0;
  padding: 0;
  background-color: #333; /* Default dark background */
  color: #fff;
  font-family: inherit;
}

.footer-sec-wrapper {
  max-width: 1100px; /* Adjust based on your theme width */
  margin: 0 auto;
  padding: 20px;
}

/* Footer Header (Image Only) */
.footer-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-header .widget-content img {
  max-width: 100%;
  height: auto;
}

/* Footer Top & Bottom (Multiple Widgets) */
.footer-top, .footer-bottom {
  margin-bottom: 20px;
}

/* Footer Columns (3 Cols) */
.footer-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 20px;
}
.footer-col {
  flex: 0 0 31%; /* Approximation for 3 columns with gaps */
  margin-bottom: 15px;
}

/* Footer Bar (Credits & Links) */
.footer-bar {
  padding: 15px 20px;
  background-color: rgba(0,0,0,0.2);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.footer-bar .Attribution {
  margin: 0;
}
.footer-bar .LinkList ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}
.footer-bar .LinkList li {
  margin-left: 15px;
}
.footer-bar .LinkList a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

/* Responsive for smaller screens */
@media screen and (max-width: 768px) {
  .footer-col {
    flex: 0 0 100%;
  }
  .footer-bar {
    text-align: center;
    justify-content: center;
  }
  .footer-bar .LinkList ul {
    justify-content: center;
    margin-top: 10px;
    width: 100%;
  }
  .footer-bar .LinkList li {
    margin: 0 10px;
  }
}

/* --- 2. Blogger Layout Mode Styling (CRUCIAL) --- */
/* These styles only appear in the Layout tab, making sections easy to find */
body#layout #footer-wrapper {
  background-color: #f4f4f4;
  color: #333;
  padding: 10px;
  margin-top: 50px;
  border: 2px dashed #ccc;
}

/* Common style for all footer b:section containers in Layout mode */
body#layout .footer-sec {
  border: 1px solid #ddd;
  background-color: #fff;
  margin-bottom: 15px !important;
  padding: 10px !important;
  box-sizing: border-box;
}

/* Visual labeling for easy identification */
body#layout .footer-sec::before {
  font-weight: bold;
  display: block;
  padding-bottom: 5px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
}

/* Specific colors for each section to differentiate them */
body#layout #footer-header-sec { border-color: #ff9800; }
body#layout #footer-header-sec::before { content: "1. Footer Header (IMAGE ONLY)"; background-color: #ff9800; }

body#layout #footer-top-sec { border-color: #2196f3; }
body#layout #footer-top-sec::before { content: "2. Footer Top (MULTIPLE WIDGETS)"; background-color: #2196f3; }

body#layout #footer-col-left { border-color: #4caf50; }
body#layout #footer-col-left::before { content: "3a. Footer Col: LEFT"; background-color: #4caf50; }

body#layout #footer-col-center { border-color: #4caf50; }
body#layout #footer-col-center::before { content: "3b. Footer Col: CENTER"; background-color: #4caf50; }

body#layout #footer-col-right { border-color: #4caf50; }
body#layout #footer-col-right::before { content: "3c. Footer Col: RIGHT"; background-color: #4caf50; }

body#layout #footer-bottom-sec { border-color: #9c27b0; }
body#layout #footer-bottom-sec::before { content: "4. Footer Bottom (MULTIPLE WIDGETS)"; background-color: #9c27b0; }

body#layout #footer-bar-sec { border-color: #e91e63; }
body#layout #footer-bar-sec::before { content: "5. Footer Bar (LINKLIST + ATTRIBUTION)"; background-color: #e91e63; }

/* In Layout Mode, ensure columns look like rows for clarity */
body#layout .footer-columns {
  display: block;
}
body#layout .footer-col {
  width: 100% !important;
  float: none;
}
]]>

भाग 2: XML फ़ुटर संरचना (Structure)

अपनी थीम के XML फ़ाइल में पुराने फ़ुटर कोड (जैसे <footer...</footer> या id='footer' वाले div) को खोजें और उसे नीचे दिए गए कोड से बदल दें।

यह कोड वास्तविक b:section टैग्स जोड़ता है। मैंने सभी अनुभागों को आपकी आवश्यकतानुसार Configure किया है:

  • Footer Header: maxwidgets='1' सेट किया है ताकि केवल एक Image विजेट आ सके।

  • Columns: तीन अलग-अलग b:section बनाए हैं।

  • Bar: डिफ़ॉल्ट रूप से एक Attribution (Credits) विजेट जोड़ा है जिसे Locked रखा है (लेकिन आप उसे XML में unlock कर सकते हैं अगर चाहें)।

XML
<footer id='footer-wrapper'>
  <div class='footer-sec-wrapper'>

    <div class='footer-header'>
      <b:section class='footer-sec' id='footer-header-sec' maxwidgets='1' showaddelement='yes'>
        </b:section>
    </div>

    <div class='footer-top'>
      <b:section class='footer-sec' id='footer-top-sec' showaddelement='yes'/>
    </div>

    <div class='footer-columns'>
      
      <div class='footer-col footer-left'>
        <b:section class='footer-sec' id='footer-col-left' showaddelement='yes'/>
      </div>

      <div class='footer-col footer-center'>
        <b:section class='footer-sec' id='footer-col-center' showaddelement='yes'/>
      </div>

      <div class='footer-col footer-right'>
        <b:section class='footer-sec' id='footer-col-right' showaddelement='yes'/>
      </div>
      
    </div> <div class='footer-bottom'>
      <b:section class='footer-sec' id='footer-bottom-sec' showaddelement='yes'/>
    </div>

  </div> <div class='footer-bar'>
    <b:section class='footer-sec' id='footer-bar-sec' showaddelement='yes'>
      <b:widget id='Attribution1' locked='true' title='' type='Attribution' visible='true'/>
      </b:section>
  </div>

</footer>

कैसे इस्तेमाल करें:

  1. Blogger Dashboard -> Theme -> क्लिक करें तीर के निशान पर -> Edit HTML.

  2. CSS कोड (भाग 1) को खोजें और उसे ]]></b:skin> के ठीक ऊपर पेस्ट करें।

  3. Theme के XML में </body> टैग से ठीक ऊपर (या अपने पुराने फ़ुटर कोड को हटाकर) भाग 2 का पूरा कोड पेस्ट करें।

  4. Save पर क्लिक करें।

  5. अब Layout टैग में जाएं। आप देखेंगे कि फ़ुटर अब 5 अलग-अलग, रंगीन और लेबल वाले बॉक्स में बँटा हुआ है। आप आसानी से विजेट्स को ड्रैग एंड ड्रॉप कर सकते हैं।

अगर आपको किसी स्टेप में दिक्कत आए, तो बेझिझक पूछें!

0 Comments

Post a Comment