WordPress.org

Ready to get started?Download WordPress

Forums

iNove
how to enable custom navigation menu features on iNove theme theme (3 posts)

  1. brianhoe
    Member
    Posted 2 years ago #

    iNove theme does not natively support menus. Does anyone know how to enable custom navigation menu features on iNove or blocks 2 theme.

    http://wordpress.org/extend/themes/inove/

  2. Laurent J.V. Dubois
    Member
    Posted 2 years ago #

    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;
    }
  3. Laurent J.V. Dubois
    Member
    Posted 2 years ago #

    in template/header.php
    the content of the menu is now :

    <!-- menus START -->
    <?php mAsseur_nav(); ?>
    	<!-- menus END -->

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic