[Resolved] Adding a menu location to an element block?

Home Forums Support [Resolved] Adding a menu location to an element block?

Home Forums Support Adding a menu location to an element block?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2043538
    Lewis

    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

    #2043754
    David
    Staff
    Customer Support

    Hi there,

    maybe this article will assist – it will allow you to create a shortcode to output your wp_nav_menu:

    https://www.cozmoslabs.com/1170-wp_nav_menu-shortcode/

    #2043826
    Lewis

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

    #2043856
    David
    Staff
    Customer Support

    Awesome – glad to hear that!!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.