Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Dynamic Logged in/out Menus #54408

    Getting Your Hands Dirty

    Actually they are not going to get very dirty, as I have found that you only require 2 simple edits.

    In functions.php

    Change…

    Code:
    /* Activate native wordpress navigation menu and register a menu location */
    add_theme_support(‘nav_menus’);
    $avia_config['nav_menus'] = array(‘avia’ => ‘Main Menu’, ‘avia2′=> ‘Sub Menu’);
    foreach($avia_config['nav_menus'] as $key => $value){ register_nav_menu($key, THEMENAME.’ ‘.$value); }

    To…

    Code:
    /* Activate native wordpress navigation menu and register a menu location */
    add_theme_support(‘nav_menus’);
    $avia_config['nav_menus'] = array(‘avia’ => ‘Main Menu’, ‘avia2′=> ‘Sub Menu’, ‘avia3′=> ‘Members Menu’);
    foreach($avia_config['nav_menus'] as $key => $value){ register_nav_menu($key, THEMENAME.’ ‘.$value); }

    Then in header.php

    Change…

    Code:
    /*
    * display the main navigation menu
    * check if a description for submenu items was added and change the menu class accordingly
    * modify the output in your wordpress admin backend at appearance->menus
    */
    $args = array( ‘echo’=> false,
    ‘fallback_cb’ => ‘avia_fallback_menu’,
    ‘theme_location’ => ‘avia’,
    ‘menu_class’ => ‘menu’,
    ‘walker’ => new avia_description_walker()
    );

    To…

    Code:
    /*
    * display the main navigation menu
    * check if a description for submenu items was added and change the menu class accordingly
    * modify the output in your wordpress admin backend at appearance->menus
    */
    if ( is_user_logged_in() ) {
    $args = array( ‘echo’=> false,
    ‘fallback_cb’ => ‘avia_fallback_menu’,
    ‘theme_location’ => ‘avia3′,
    ‘menu_class’ => ‘menu’,
    ‘walker’ => new avia_description_walker()
    );
    } else {
    $args = array( ‘echo’=> false,
    ‘fallback_cb’ => ‘avia_fallback_menu’,
    ‘theme_location’ => ‘avia’,
    ‘menu_class’ => ‘menu’,
    ‘walker’ => new avia_description_walker()
    );
    }

    You will then find a 3rd supported Corona Menu within the WordPress “Appearance – Menus”. and you can create a menu and select it from the new drop down list as normal.

    in reply to: Dynamic Logged in/out Menus #54407

    Thanks Chris,

    The idea was more to make it easier for those that don’t want to get their hands “dirty”.

    Although I am sure it would be a handy WP feature in general.

    Probably a simple hook for a plugin.

    in reply to: Sidebar Width #54414

    Ahh OK Thanks.

    I will just use a full with page where needed.

    in reply to: Color for activated SUBMENU link? #54000

    Hi Dude,

    I was wondering why in Corona that the ‘Home’ link doesn’t use: li.current-menu-item

    This means that not only in the submenu but in the mainmenu the Home link never gets highlighted.

    Of course it seems to be a custom link as it is added in the WP-Menus.

    Anyway to highlight it?

    Thanks…

    in reply to: Adding a Login/Logout Menu Item #53952

    Excellent! Thanks!!!

    Thanks also for fixing the display of the post after I added the code snippet.

    I have been building my site over the past few hours and the theme is awesome :-)

Viewing 5 posts - 1 through 5 (of 5 total)