Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Create sub-menu in the footer

  • Hello guys,

    I’d like to create a menu in the footer that displays a sub-menu that opens when you move the mouse over it, just for a category like the one in this image. How can I do this?

    https://postimg.cc/ctdG7cjT

  • You can use the secondary navigation.

    1. Enable Secondary Nav module at appearance > GeneratePress.

    2. Assign the menu to secondary navigation at appearance > menus.

    3. Go to customize > layout > secondary navigation, set Navigation Location to No Navigation.

    4. Use this PHP code to generate a shortcode for secondary navigation:

    add_shortcode( 'secondary_navigation', function() {
        ob_start();
    
        if ( function_exists( 'generate_secondary_navigation_position' ) ) {
            generate_secondary_navigation_position();
        }
    
        return ob_get_clean();
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    5. Add the shortcode [secondary_navigation] to your site footer.

    Let me know if this helps!

  • Hello Ying,

    For the last step, where can i Add the shortcode [secondary_navigation] on site footer ?

    I’ve tried adding [secondary_navigation]: from widget – footer but it doesn’t change anything.

  • Were you using a shortcode block to insert the shortcode?

    Can I see your site?

  • Hello, sorry for the delay in replying.

    Yes, I used a shortcode block to insert the shortcode, but I’m not sure I did it correctly. I added a piece of code in my footer widget as shown in the image :
    https://postimg.cc/4mNbf9Vp

    Here is the website: https://passion-padel.com/

  • It looks like the secondary nav’s CSS is not loading on your site.

    Can you try disabling your cache plugins to test?

    Let me know 🙂

  • Strange, I’ve disabled the cache plugins and it doesn’t work… 😕

  • Hi there,

    Can you provide temporary login access to your site so we can check your backend settings?

  • Hello, how can I give you temporary access?

  • Hi there,

    you can share login URLs, User names and passwords in the Private Information field below.
    So you can create a new user login for us, and once you are done you can delete the login.

    Our servers auto delete any private information in the forums if the topic is resolved or after a period of not replies.

  • Ok it’s done.

    let me know when your’re find solution

  • You were adding the PHP code as HTML code:
    https://app.screencast.com/fYnl2sRm76ooT

    Change it to PHP, then you can use the shortcode.

  • Thanks. I use the shortcode but nothing happened.

    Can you tell me exactly how to use the shortcode?

  • Where did you add the shortcode?

  • I add the shortcode here : https://postimg.cc/3dBQyq6w

    And here : https://postimg.cc/87X846TQ

    I don’t know if I should add the shortcode to my footer widgets and modify my menu settings…

  • Hi there,

    the second image, remove the shortcode from there.
    And instead add the shortcode to a Footer Widget.

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