An example of a page, in the editor, that has one unique banner (which only shows up on this page).
This guide will help you create banners which will be visible either on all pages or on the one that you define.
Note: This guide is about pages that use the page template
In this section you will learn how to:
- Edit code that will enable unique page banners
- Setup unique page banners
1. Edit code that will enable unique page banners
From the Shopify Admin:
- Click "Online Store"
- Next to your copy of Loft, click "Actions"
- Click "Edit code"
- Search for the "Templates" folder
- Open the "page.liquid" file
- Replace all the existing code with the following block of code
- In the left sidebar, scroll down to "Sections" and click the "Add a new section" link
- Give the name "pages" to the new Section and click "Create Section"
- In "pages.liquid" add the code from the link here and click "Save"
2. Setup unique page banners
- Once the code from step 1 has been added, load the Theme Editor (from your admin go to Themes > Click "Customize" next to the theme > From the Theme Editor, click on a page, which will load the "Sections"
- Click the section called "Pages"
- Click "Add page banner" (See Figure 1 below)
- This will create a new block on your page.
- Next, click the "Select page" button, and choose the collection that your add should display on (See Figure 2 below).
- NOTE: If you don't select any collection, the ad will be visible on ALL collection pages (and will act as a global collection ad).
Figure 1. Example of the menu to click in order to create a new banner block
Figure 2. Example of selecting the page that the new banner should display on