Since: 1.0 Last Updated:
Back to Main Index

Outputs your custom code after the the opening nav and before the menu links begin.

Location: partials/header-centered.php / partials/header-standard.php

Code output appears after 

Code output appears before:

The following illustration indicates the placement of layers_before_header_nav (A) compared to layers_after_header_nav (B)



This hook is useful for inserting something like a home icon at the beginning of the menu. This example uses fontawesome in a child theme:

To place code before the opening <nav>, use layers_after_logo

To change the format or content of the menu list itself,  filter wp_nav_menu to provide different arguments.