How display custom menu navigation on post/page


Hello Everyone!

if you are planing to add your custom menu from anywhere in post,then add this code in your theme function file.

/* Custom code for call menu any where [menu name="Site-Map"]*/

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('raghu_menu', 'print_menu_shortcode');

Screenshot-4

Screenshot-4
Enjoy Code!

Advertisements

Sr. Software Engineer

Tagged with: , ,
Posted in Wordpress
One comment on “How display custom menu navigation on post/page
  1. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet
    my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: