30th Oct '23
/
0 comments

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 630 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Automatically Adding Classes to Elements in Bricks

Automatically Adding Classes to Elements in Bricks

In the Bricks Facebook group a user asks: Default classes for theme style elements? Is it possible to assign default classes to elements in the…
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:
Pro
Menu Item Descriptions in Bricks

Menu Item Descriptions in Bricks

Updated on 17 Jul 2023 This Pro tutorial provides the steps to show descriptions for nav menu items with the corresponding CSS styling for desktops…
How to Add a Dot Separator Between Nav Menu Items in Bricks

How to Add a Dot Separator Between Nav Menu Items in Bricks

Looking to add a circular dot separator between the nav menu items in your Bricks site? Add the following at Bricks → Settings → Custom…
Categories:
Tags:
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…