Ad Units

Add an image/text advert to your homepage which is great for pushing important aspects of the site.

Wireframe

Homepage Adverts


Preparation Checklist

Before you start this tweak, it's a good idea to run through our preparation checklist below:

  • Read through the Getting Started to get a better sense of how the Control Panel, Database and Front End store interact.
  • Learn our recommended Simple Workflow. This makes the implementation process as easy as possible.
  • Create a new Staging Theme for this tweak. This allows you to preview any changes before they are visible to live customers.

Coding Instructions

Step 1: Setup the ad group

To add an advert to the homepage you will first need to create an advert group.

  1. In the control panel, go to Setup & tools > All settings & tools > Webstore Advertising Groups.
  2. Setup a new advert group named ad_units.

Step 2: Create the adverts

Create an advert and set the "Group" to ad_units and "Select location for ad to appear" to "Home".

Step 3: Add the homepage code

Open /httpdocs/assets/themes/[THEME-NAME]/templates/cms/home.template.html and paste the following code into the template where you would like it to appear.

[%advert type:'text' template:'text' limit:'10' ad_group:'ad_units'%]
    [%param *header%]
        <div class="row">
    [%/param%]
    [%param *footer%]
        </div>
    [%/param%]
[%/advert%]

Final Result

Adverts


Customising this section

More information on how to customise this section can be found within the Advert Documentation.

Was this article useful?

Be notified when this page is updated. Optional.