Add a Submenu Shortcode to WordPress

There are many plugins and code snippets for adding an entire navigation menu to a page in WordPress, but what if you want to add only a single submenu? Here we have for you a code snippet that provides a shortcode to do just that. You can add this to your theme’s functions.php file.