Create Custom Menu In Wordpress

function clean_custom_menus() { $menu_name = ‘top’; // specify custom menu slug if (($locations = get_nav_menu_locations()) && isset($locations[$menu_name])) { $menu = wp_get_nav_menu_object($locations[$menu_name]); $menu_items = wp_get_nav_menu_items($menu->term_id);//echo ‘<pre>’; //print_r($menu_items); //$menu_list = ‘<nav>’ .”\n”; $menu_list .= ‘<ul class=”nav navbar-nav”>’; $count = 0; $submenu = false; foreach( $menu_items as $menu_item ) { $link = $menu_item->url; $title = $menu_item->title; if ( …

Read More

Hello World!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Read More