Archived topic
Generate_insert_into _(secondary)_navigation?
2 replies · Started by Are Martin on September 17, 2015
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...
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 }
Glad you got it working - thanks for posting the code! :)
