My code is pretty bad , due to my limited php skill, but if you want to improve it …
In the functions.php file:
function mAsseur_addmenus() {
register_nav_menus(
array(
'primary' => 'The Main Menu',
)
);
}
add_action( 'init', 'mAsseur_addmenus' );
function mAsseur_nav() {
if ( function_exists( 'wp_nav_menu' ) )
wp_nav_menu( 'menu=primary&container_class=pagemenu&container=false&menu_id=menus&fallback_cb=mAsseur_nav_fallback' );
else
mAsseur_nav_fallback();
}
function mAsseur_nav_fallback() {
wp_page_menu( 'show_home=Start&menu_class=pagemenu' );
}
add_filter( 'wp_nav_menu_items', 'your_custom_menu_item', 10, 2 );
function your_custom_menu_item ( $items, $args ) {
$items = '<li class="'.$home_menu.'"><a class="home" href="'. get_settings('home').'" title="Accueil">Accueil</a></li>'.$items;
$items .= '<li><a class="lastmenu" href="javascript:void(0);"></a></li>';
return $items;
}