Menu de recolhimento de bootstrap com menu WordPress

Maneira rápida e fácil de usar menus personalizados do WordPress com bootstrap

<?php
wp_nav_menu
( array(
'menu' => 'main-menu',
'container_class' => 'navbar-content nav-collapse collapse',
'menu_class' => 'nav nav-tabs pull-right',
'menu_id' => 'main-menu' )
);
?>

<script>
$
(document).ready(function(){
$
("ul.sub-menu").parent().addClass("dropdown");
$
("ul.sub-menu").addClass("dropdown-menu");
$
("ul#main-menu li.dropdown a").addClass("dropdown-toggle");
$
("ul.sub-menu li a").removeClass("dropdown-toggle");
$
('.navbar .dropdown-toggle').append('<b class="caret"></b>');
$
('a.dropdown-toggle').attr('data-toggle', 'dropdown');
});
</script>