AMI | Global Math

1.2 Getting to Know the Layout and How to Install Code

Many people stop at the first step because the terms feel foreign: gadget, section, code. Yet everything is simple. This lesson introduces the Blogger map and one way of installing code that you will use throughout the guide.

Homepage map: each box is one section in the Blogger Layout.
Figure 1. Homepage map: each box is one section in the Blogger Layout.

In This Lesson

  1. 1Terms you must know
  2. 2How to install code: five steps
  3. 3Anatomy of a code
  4. 4Four golden rules for writing code
  5. 5Location map: where code is installed

Terms You Must Know

TermMeaningThink of it as
Layout (Tata Letak)The settings page in Blogger. Open it from the left menu in Blogger, then click Layout.A house floor plan
Section (Bagian)A named box in the Layout, for example Featured Posts or Sidebar.A room in the house
GadgetContent you add to a section. This guide always uses the HTML/JavaScript gadget.Furniture in a room
Shortcode (kode)Short text starting with curly braces and a dollar sign. The template turns it into a display.A remote control
LabelAn article category in Blogger. The label name in the code must match exactly.A bookshelf
ModuleAdditional features (hero, WhatsApp, protection, advanced Next Post). Requires an active license code.Extra accessories
Key TakeawayYou don't need to write programs. Your job is only to find the right section in the Layout, add a gadget, then paste the code that has been provided.
The flow is always the same: Layout, Section, Gadget, Code.
Figure 2. The flow is always the same: Layout, Section, Gadget, Code.

How to Install Code: Five Steps

These five steps apply to almost every code in the guide.

  1. Open blogger.com, select your blog, then click Layout in the left menu.
  2. Find the section matching the name mentioned in the lesson (for example Featured Posts).
  3. Click Add a gadget in that section, then select HTML/JavaScript. If a gadget already exists, click the pencil icon (Edit).
  4. Fill in the Title if asked, paste the code in the Content field, then click Save.
  5. Open your blog and press Ctrl+F5 (on a phone, close the tab and reopen it). If it hasn't changed, wait a minute and try again.

Anatomy of a Code

All codes in the guide follow the same pattern. Once you understand the pattern, any code will feel familiar.

Parts of a code: marker, count, source, and display form.
Figure 3. Parts of a code: marker, count, source, and display form.

Four Golden Rules for Writing Code

  1. Use one code per gadget. Don't mix them.
  2. Write it exactly as in the example, including upper and lower case: {getPosts} uses a capital P.
  3. Each setting takes the form $name={value}, separated by spaces. The value must not contain $, =, or }.
  4. $label must match the label name in Blogger exactly. A wrong label displays the text Error: No Results Found.
NoteThe most common reason beginners fail is the wrong placement: the gadget is installed in the wrong section, or a gadget type other than HTML/JavaScript is used. Check those two things first if the code doesn't appear.

Location Map: Where Code Is Installed

Save this table. You will often come back here.

Section nameGadget typeMax. gadgetsFor code
Header MenuLink List1dropdown menu (mega, tabs)
Ticker NewsHTML/JavaScript1ticker
Featured PostsHTML/JavaScript1Featured or Hero
Kartu Berita 3 KolomHTML/JavaScript4homepage blocks (grid)
Content Section 1 and 2HTML/JavaScriptunlimitedhomepage blocks
SidebarHTML/JavaScript, Link Listunlimitedarticle lists, social icons, Mailchimp, ads
Footer Left, Center, RightHTML/JavaScript, Link List3 per columnarticle lists, social icons, WhatsApp, protection
Related PostsHTML/JavaScript1related articles
Post ADS 1, 2, 3HTML/JavaScript1 per sectionads in articles
Header ADS, Footer ADSHTML/JavaScript3 per sectionads
AdSense Configuration (Code)HTML/JavaScript1AdSense unit ID
Settings: Sidebar and Next PostHTML/JavaScript1Next Post
License and Updates (Code)HTML/JavaScript1license code
ExampleWant to display a news ticker? Check the table: the section is Ticker News, the gadget is HTML/JavaScript, maximum 1 gadget. You'll learn the code in Lesson 2.1.
ExerciseOpen your blog's Layout. Find the five sections in the table: Header Menu, Featured Posts, Sidebar, Footer Left, and Related Posts. Note whether each one already contains a gadget.
Lebih baru Lebih lama

Contact Us