guillermorangel
8/5/2013 - 9:27 PM

Create shortcode for displaying menu in page http://webdesignandsuch.com/embed-a-wordpress-custom-menu-in-page-content-with-a-shortcode/

<?php
add_action( 'init', 'my_custom_menus' );
function my_custom_menus() {
    register_nav_menus(
        array(
            'primary-menu' => __( 'Primary Menu' ),
  		'secondary-menu' => __( 'Secondary Menu' ),
            'footer-left' => __( 'Footer Left' ),
			'footer-right' => __( 'Footer Right' ),
			'sitemap' => __( 'Sitemap' )
        )
    );
}

function print_menu_shortcode($atts, $content = null) {
extract(shortcode_atts(array( 'name' => null, ), $atts));
return wp_nav_menu( array( 'menu' => $name, 'echo' => false ) );
}
add_shortcode('menu', 'print_menu_shortcode');

?>

[menu name="sitemap"]