Plain HTML pages in Bricks

As great as Bricks is, there might be some situations when you want to put raw HTML and render just that, with no other WordPress/Bricks (or any other active child/parent theme)/plugins baggage.

Use case: You are trying to embed a TypeForm quiz and don’t want any code from Bricks or other plugins to pollute your HTML.

Sample embed code:

<div data-tf-live="01HQPE13KWFMSHKSK7YHG65EKH"></div><script src="//"></script>

Turning off the header and footer for your specific Page in Bricks PAGE SETTINGS → GENERAL or adding it to be excluded from your single Bricks template that applies to all Pages won’t suffice.

Ben Affleck in this situation:

The solution is to use a traditional WordPress Page Template.

Step 1

Create a file named say page_quiz.php having:

* Template Name: Quiz


<div data-tf-live="01HQPE13KWFMSHKSK7YHG65EKH"></div><script src="//"></script>


Step 2

Upload it to your child theme directory.

Step 3

Apply this template for the Page.

If you have already edited the Page with Bricks and added any elements, delete them.

Result on the front end is the same but looking at the page source, all there will be is:

Much better.

You can, of course, add HTML DOCTYPE declaration, head and body tags, etc., if needed.

Instant access to 390+ Bricks code tutorials with BricksLabs Pro

Leave the first comment