I need to create a navigation menu in wordpress when i activate my theme.
I have some pages created at the time of theme activation and i need to add these pages to the navigation menu .
I had created the menus using register_nav_menu
, but i cant add the pages under this menu .
Please help me
Regards
Have you tried the wp_update_nav_menu_item() function?
That should do the trick for you! Have a look at http://www.acousticwebdesign.net/wordpress/how-to-create-wordpress-3-navigation-menus-in-your-theme-or-plugin-code/ for more in depth info.
Just write in your functions.php
// To add Orders as main menu after dasboard.
http://codex.wordpress.org/Function_Reference/add_dashboard_page