I added this to my theme code:
<?php print menu_access_menu_tree('primary-links'); ?>

That menu contains some menu items that have child items. How do I limit the levels it prints? I would like to divide my menu to main menu on top of the page and child menu on the right sidebar.

I'm also using Menu Blocks.