__( 'Primary Navigation', THEMENAME ), ) ); // If custom menu exists print it, otherwise show the default wp_page_menu function arixwp_menu($amt) { if ( function_exists( 'wp_nav_menu' ) ) { wp_nav_menu( array( 'container_class' => '', 'container_id' => 'menu', 'menu_id' => 'dropmenu', 'menu_class' => '', 'theme_location' => 'primary', 'link_before' => '', 'link_after' => '', 'number' => $amt , 'fallback_cb' => 'arixwp_fallbackMenu' ) ); } else { arixwp_fallbackMenu( $amt ); } } // Arguments for wp_page_menu function arixwp_fallbackMenu( $amt ) { wp_page_menu( array( 'show_home' => __( 'Home',THEMENAME ), 'link_before' => '', 'link_after' => '', 'sort_column' => 'menu_order' ) ); } // Add CLASS attributes to the first
  • occurence in wp_page_menu function arixwp_menuclass( $liclass ) { if ( !is_front_page() ) { return preg_replace( '
  • ', 'li class="first"', $liclass, 1 ); } else { return preg_replace( '
  • occurence in wp_page_menu function arixwp_dropclass( $liclass ) { return preg_replace( '