[Resolved] Generate_insert_into _(secondary)_navigation?

Home Forums Support Generate_insert_into _(secondary)_navigation?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #137606
    Are Martin

    Hi Tom, in the thread linked below you explained how to insert html and other stuff into the main navigation.

    https://generatepress.com/forums/topic/place-html-or-widgets-inside-sticky-menu-nav-bar/

    However, Now I would like to do the same with the secondary navigation. How would I modify the code to achieve that?

    I took a wild shot and tried this:

    add_action( 'generate_inside_navigation','generate_insert_into_secondary_navigation' );
    function generate_insert_into_secondary_navigation()
    { ?>
    
    My html here
    
    <?php }

    That, didn´t work though…

    #137608
    Are Martin

    I figured it out 🙂 I played around with the code and labels and eventually this worked:

    add_action( 'generate_inside_secondary_navigation','generate_insert_into_secondary_nav' );
    function generate_insert_into_secondary_nav()
    { ?>
    
    My html here
    
    <?php }
    #137632
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working – thanks for posting the code! 🙂

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