Now that the top section is tidy, fill in the middle and side sections. You will create news blocks per category, lists in the sidebar and footer, related articles, social icons, and an email subscription form.
In This Lesson
- 1Homepage article blocks
- 2Sidebar and footer
- 3Related articles
- 4Social media icons
- 5Email subscription form
Homepage Article Blocks
A homepage block is a row of articles from one label, for example Headline News or Announcements. You may use several blocks at once.
Displays a collection of articles from one label as a block on the homepage. The gadget Title becomes the block title, and a "See all" link appears automatically if the label is filled in.
Ready-to-paste code
{getPosts} $results={5} $label={Berita} $type={block1}
{getPosts} $results={5} $label={Berita} $type={block2}
{getPosts} $results={4} $label={Berita} $type={list1}
{getPosts} $results={6} $label={Berita} $type={grid2}
{getPosts} $results={4} $label={Pengumuman} $type={col-left}
{getPosts} $results={4} $label={Prestasi} $type={col-right}
{getPosts} $results={5} $label={Video} $type={video}
Steps
- Add an HTML/JavaScript gadget in one of the sections above.
- Fill in the Title (for example Headline News) and paste one code in Content, then Save.
- For two side-by-side blocks, create two gadgets in sequence in the same section: the first
col-left, the secondcol-right.
What each part of the code means
| Part | Meaning |
|---|---|
block1 | One large article plus a small list (fill in 5). |
block2 | One large article plus a two-column grid. |
list1 | List: small image on the left, title and summary on the right. |
grid1, grid2 | Card grid. grid2 is the default, with taller images. Fill in 3 or 6. |
col-left, col-right | Two half-width blocks side by side. |
video | For video labels. $style={2} uses a normal background; without it, a dark background. |
$results, $label | Number of articles (default 3) and their source (default recent). |
Sidebar and Footer
The sidebar and footer contain short lists in the side column and the bottom section of the page.
Displays articles (or the latest comments) in a narrow column. Suitable for Latest, Popular, or Latest Comments.
Ready-to-paste code
{getPosts} $results={5} $label={recent} $style={2}
{getPosts} $results={5} $type={comments}
Steps
- Add an HTML/JavaScript gadget in the Sidebar or a footer column.
- Fill in the Title (for example Latest), paste the code, then Save.
$resultsis required in this section.
What each part of the code means
| Part | Meaning |
|---|---|
$style={1} | One large article plus a list. |
$style={2} | List with small images. |
$style={3} | Two-column small cards. |
$type={comments} | Latest comments. Does not use $label. |
Footer | In the footer, style 1 is automatically used as style 2. |
Related Articles
Related articles appear below the post so readers keep reading.
Displays articles with the same label below the post, to encourage readers to open another page. The article currently being viewed is not shown. Only visible on article pages.
Ready-to-paste code
{getPosts} $results={3} $style={1}
Steps
- Fill in the gadget Title with the section text, for example Read Also.
- Paste the code in Content, then Save.
What each part of the code means
| Part | Meaning |
|---|---|
$results | Number of articles (3 or 4 works well). |
$style={1} | Card grid. |
$style={2} | Small grid. |
$style={3} | List. |
Social Media Icons
Social icons are made from a regular link list: you just fill in the name and address.
Turns a regular link list into a row of social media icons.
Ready-to-paste code
Name: getSocial URL: #
Name: facebook URL: https://facebook.com/your-account
Name: instagram URL: https://instagram.com/your-account
Steps
- Add a Link List gadget in one of the sections above.
- Add the first link with Name
getSocialand URL#. This is a required marker and is not displayed. - Add the next links: fill in the Name with the icon name, the URL with your profile address. Save.
What each part of the code means
| Part | Meaning |
|---|---|
Icon name | facebook, twitter, instagram, youtube, whatsapp, telegram, tiktok, linkedin, pinterest, github, email, rss, share |
Text in Sidebar | Add #Text at the end of the URL, for example https://facebook.com/account#Facebook, so the text appears next to the icon. |
Email Subscription Form
This form collects reader emails via Mailchimp.
Displays an email field and a subscribe button that sends the data to Mailchimp.
Ready-to-paste code
Gadget title: {getMailchimp} $title={Subscribe} $text={Get the latest news in your email}
Gadget content: https://your-mailchimp-form-action-address
Steps
- In Mailchimp, open the Embedded form and copy the address in the form's
actionattribute. - In Blogger, write the code in the Title field and paste just that address in the Content field. Save.
What each part of the code means
| Part | Meaning |
|---|---|
$title | Form title. If empty, the default text is used. |
$text | Explanatory sentence below the title. |
block1 block for your blog's main label, one side2 list in the Sidebar, and one Related Posts. Make sure the label names match exactly as in Blogger.