Site logo

Archived topic

Adding a menu location to an element block?

3 replies · Started by Lewis on December 9, 2021

Viewing posts 1–4 of 4

I've added a new menu location to my functions.php file as such;

/**
 * Additional Menu Location
 */
add_action( 'init', 'register_my_menu' );
function register_my_menu() {
	register_nav_menu('quick-links-menu',__( 'Quick Links' ));
}

I would typically have to add something like the following to create a new menu location;

<?php wp_nav_menu( array( 'theme_location' => 'quick-links-menu', 'container_class' => 'footer-link-list' ) ); ?>

As my footer is within the elements section (Block - Site Footer), what would be the correct way to add this functionality, within this scenario?

Regards,
Lewis

Perfect, just what I was looking for. Excellent Support as always. 👌

Awesome - glad to hear that!!

This archived topic is closed to new replies.