How can I insert a secondary menu before the credits

How can I insert a secondary menu before the credits by the customizr thema?
I tried the code they give but it puts the secondary menu after credits.
Tks for any help.
Please be gentle I am just starting :slight_smile:

  • Tyler Postle
    • CGO

    Hey there Helena,

    Hope you`re doing well today and thanks for your question!

    I`ve never used Customizr before; however, I set this up and I think I got the solution for ya :slight_smile:

    Thanks for mentioning that they already have code for it too, I used that as well. So, add this to your functions.php file of your theme(preferably a child theme):

    add_action( 'init', 'register_secondary_menu' ); // this registers your menu with WP
    function register_secondary_menu() {
        if ( function_exists( 'register_nav_menu' ) ) {
            register_nav_menu( 'secondary-menu', 'Secondary Menu' );
    // Select the add_action you need, depending on where you want to add the menu and disable the rest:
    add_action('__before_footer', 'display_secondary_menu');     // use this line to add above footer
    // display function for your menu:
    function display_secondary_menu() {
        echo ( has_nav_menu( 'secondary-menu' ) ? wp_nav_menu (
            array (
                'theme_location' => 'secondary-menu',
                'container_id'    => 'secondary-menu',
                'container_class'    => 'secondary-menu'
        ).'<div class=&quot;clearall&quot;></div>' : '' );

    Make sure you add the CSS they provided as well, you probably already have, but here it is :slight_smile:

    #secondary-menu ul { text-align: center; list-style-type: none;}
    #secondary-menu ul li {display: inline-block; padding: 0 5px;}

    If you don`t have a custom CSS sheet then you can use this plugin:

    After you do that then the menu should look like my screenshot :slight_smile:

    Let me know if you still need any further assistance here!

    All the best,

  • mpress
    • Code Wrangler

    Thanks Tyler!

    I have tried this option already. What I want is this secondary menu just before credits but not before footer.
    In your example you donot have a footer. As soon as you define footer it will no longer be just before credits, but before footer...

    Did you understand? Looks like bit confusing....

  • Predrag Dubajic
    • Support

    Hi Helena,

    Hope you're doing well today.

    Just to get back on a previous solution for a second, have you tried using __after_footer_widgets hook?

    If this doesn't work and you are going to include new widget area we would be happy to help sorting that out :slight_smile:
    You can place your menu with some CSS code but I would need to have a look at your site to give you exact code to use.
    Can you add new widget area, insert your menu and allow support access and I will have a look at it and sort it out.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.