How to Limit the Depth of Nav Menu in Bricks

Updated on 31 Oct 2023

This Pro tutorial provides the steps for limiting the depth of WordPress navigation menu rendered via Bricks' Nav Menu element.

Ex.: Limiting the depth to 2 of a specific menu (by its ID):

Before:

After:

Step 1

Add the following in child theme's functions.php 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 526 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Featured Image Fallback in Bricks

Featured Image Fallback in Bricks

This Pro tutorial shows bricks/element/settings filter of Bricks builder can be used to specify the ID of an image in the WordPress Media Library that…
Pro
How to Combine Multiple Menus into Bricks’ Mobile Menu

How to Combine Multiple Menus into Bricks’ Mobile Menu

Bricks' native 'Nav Menu' element comes with a built-in mobile menu, which shrinks the menu down to a menu toggle button to open an offcanvas…
Categories: