Archived topic
Shortcode Assigned to Menu Custom Link
5 replies · Started by Steig on October 14, 2016
Hi Tom,
I'd like to create a menu with a custom link, but instead of a regular URL, I'd like to put in a shortcode. Is that possible?
Thanks,
Steig
Maybe something like this will help?: https://en-ca.wordpress.org/plugins/shortcode-in-menus/
That seems to work, but introduces another set of problems. Taking a whole different approach with the menus, is it possible to have a secondary horizontal menu that would appear when a link is clicked on the primary menu? that secondary horizontal menu would stay visible as long as one of the menu choices in that secondary menu has been clicked.
I've read the tutorials on making secondary menus, but not how to control when they become visible.
Thanks
Something like that would require custom programming most likely.
You can make the sub-menu horizontal like this: https://gist.github.com/generatepress/fc710ced4501566999fc
Then use "Customize > Layout > Primary Navigation > Navigation dropdown" and set it to "Click - Menu Item".
Would I put the CSS code at the GitHub link into the simpleCSS window on a particular page? Or is there some master page it would go on?
That would be global CSS, so it would go in "Appearance > Simple CSS".