26th Feb '26
/
0 comments

How to Show Header & Footer on WooCommerce My Account Endpoints in Bricks

A site member wanted to know how to hide the header and footer for the WooCommerce My Account page (/my-account/) but keep them visible on endpoints like Orders (/my-accounts/orders/), Downloads (/my-accounts/downloads/) and Edit Account (/my-accounts/edit-account/).

This Pro tutorial shows how the return value of a Bricks meta field holding info on header and footer visibility for a post (My Account Page in this case) can be short-circuited to render the header and footer on endpoints in spite of them not being output on the base My Account page.

When My Account page is edited with Bricks:

Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 621 Bricks code tutorials with BricksLabs Pro