How to Configure Magento 2 AMP Homepage

After installing the Magento 2 AMP Theme One, you get a template for AMP Homepage. In the template, we provide you with widgets, static banners, and carousel examples. Moreover, you can edit and customize all AMP content according to your needs. Please follow the steps below to learn how to configure Magento 2 AMP Homepage.

Step-by-step guide:

  1. In the main Magento menu, go to Content -> Elements -> Pages. You will find a grid with the available CMS pages.
  2. Search for “amp” in the search field.
  3. Find the Amp Theme One Homepage 1 in the grid. This is the AMP Homepage template provided with the Magento 2 AMP Theme One. By clicking Select -> Edit in the corresponding record, you will get on the Homepage edit page.
Magento 2 AMP extension configuring AMP Homepage 1.png

Once you selected Amp Theme One Homepage 1, you can set all the required settings set custom AMP content.

Step-by-step guide:

  1. Enable Page: enable or disable AMP Theme One Homepage in this option.
  2. Page Title: if necessary, enter a recognizable AMP Home Page title to be displayed in theMagento backend.
Magento 2 AMP extension configuring AMP Homepage 2.png

Content

Step-by-step guide:

  1. Content Heading: this option is not currently used in AMP.
  2. The Magneto 2 AMP extension converts simple CMS page content into AMP format if the AMP Content field is empty. However, you need to specify AMP content manually for complex pages, where you want to display banners, sliders, or AMP widgets. In this case, the extension will use your custom AMP content and ignore this Content section.
Magento 2 AMP extension configuring AMP Homepage 3.png

Search Engine Optimization

Step-by-step guide:

  1. URL key: this is the default URL key for the AMP Theme One Homepage 1.
  2. When the Magento 2 AMP extension generates AMP Homepage, it copies all metadata from your website Homepage. You can edit it if necessary in this field.

Magento 2 AMP extension configuring AMP Homepage 4.png

Page in Websites

Step-by-step guide:

  1. Store View: select the store view(s) the AMP Homepage will be visible at.
Magento 2 AMP extension configuring AMP Homepage 5.png

AMP Content

Step-by-step guide:

  1. AMP Content: in this field, you can specify AMP content for your AMP Theme One Homepage 1. Currently, the WYSIWYG editor is not supported, so we recommend using the online AMP playground to write valid AMP HTML code and paste it here.
  2. Click Save Page.
  3. Now you can validate your AMP Homepage by clicking AMP Validation.

Magento 2 AMP extension configuring AMP Homepage 6.png

How to Use the Same CMS Page for Both Regular and AMP Homepage

In the previous section, you learned how to customize the demo AMP Homepage provided with AMP Theme One. However, you may facilitate the AMP Homepage maintenance by using one CMS page with different content for regular and AMP websites. Follow the steps below to learn how to use the same CMS Page for both regular and AMP Homepage.

Step 1. Add AMP content to the default Magento Homepage

First of all, find out which CMS page is assigned as your Homepage.

Step-by-step guide:

  1. In the main Magento menu, go to Stores -> Settings -> Configuration.
  2. Navigate to General tab -> Web.
  3. Under the Default Pages, see which CMS page is selected for the CMS Home Page option. This Homepage is used on your main website.
Magento 2 AMP extension configuring AMP Homepage 7.png

Then, you need to add AMP content to this Homepage.

Step-by-step guide:

  1. In the main Magento menu, go to Content -> Elements -> Pages.
  2. In a grid with the available CMS pages, find the Homepage you use for your regular website and click Select -> Edit in the corresponding record.
Magento 2 AMP extension configuring AMP Homepage 8.png

Step-by-step guide:

  1. Scroll down to the AMP Content section and specify your AMP content in this field. Please note that you have to keep the AMP HTML specification and text formatting.
Magento 2 AMP extension configuring AMP Homepage 9.png

You can specify the AMP content yourself (we recommend checking AMP HTML code in AMP playground) or use fragments from the demo AMP Theme One Homepage.

Step 2. Assign Homepage in the Magento 2 AMP extension

Step-by-step guide:

  1. In the main Magento menu, go to Plumrocket -> AMP -> Configuration.
  2. Switch to the AMP Theme One Settings tab.
  3. In the CMS Page field, under the Homepage tab, select the Homepage you use for your regular Magento website. If you select the — Use Magento Homepage — option, the extension will automatically use Homepage from the Magento Homepage configuration.
  4. Click Save Config to apply changes.

Magento 2 AMP extension configuring AMP Homepage 10.png

How to Translate Magento 2 AMP Homepage

If you have two or more store views (e.g., English and German), you can translate your AMP Homepage into German and apply it for the German store view:

  1. Enable AMP Homepage for English store view only.
  2. Create a new CMS page with the same URL key and enable it for German store view.
  3. Specify AMP content in the German language, change metadata if necessary, etc.

How to Add AMP Widgets to Magento 2 AMP Homepage

The Magento 2 AMP extension also provides AMP widgets that you can insert into the Homepage and other CMS pages/blocks. Follow the instruction to add AMP widgets in Magento 2.

How to Use AMP v2 Homepage Template

When you install AMP v3 extension, the new Homepage template is set. It contains more dynamic elements and looks differently. However, if you used the AMP v2 extension, you can also use a similar template on your new AMP Homepage.

To implement it, you need to add a Subcategory widget with a List Template to your new AMP Homepage (see the article on adding AMP widgets in Magento 2):

Step-by-step guide:

  1. Set the Widget Type option to AMP – Subcategories.
  2. Choose the Default Category to show all main categories in the widget.
  3. Make sure to select List Template for the Default Category.
  4. Click Insert Widget to save changes.
Magento 2 AMP Extension configuring AMP Homepage 12.png

After inserting this widget, you can remove other unnecessary content from the Homepage v3.

Was this article helpful?