When you create a new page template in Shopify, it will automatically include the header, footer, and styling from the theme.liquid file. If you want to create a page without those sections, for example a landing page for a product promotion, or a wholesale landing page that you will password protect, you will have to remove the layout using Shopify Liquid.
How to remove the header and footer in Shopify?
You can remove the header, footer, and styling from a Shopify page using liquid’s line of code to remove the “layout”:
{% layout none %}
Now you can start coding below like it is a brand new site – no styling will be included. You can use the HTML boilerplate below:
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Boilerplate for blank HTML page on Shopify</title> <link rel="icon" type="image/png" href="{{ settings.favicon | image_url: width: 32, height: 32 }}"> {{ 'style.css' | asset_url | stylesheet_tag }} </head> <body> </body> </html>
Leave a comment