• Closed
  • Michael Sinclair
    Participant
    September 25, 2016 at 8:50 pm #30403

    What is the correct procedure for adding a Custom Function to Alora?
    I wish to create separate menus for logged in members and none logged in visitors.
    I am using the most update versions of Alora premium and BuddyPress as the main components.

    I have tried using the following function in 2 dedicated ‘Function’ plugins, also I have tried adding it in wp-content/themes/alora/custom_functions/custom_functions.php and bp-coreadmin-functions.php but to no avail.

    function my_wp_nav_menu_args($args = ”) {
    if( is_user_logged_in() ) {
    $args[‘menu’] = ‘secondary_navigation’;
    } else {
    $args[‘menu’] = ‘main_navigation’;
    }
    return $args;
    }
    add_filter( ‘wp_nav_menu_args’, ‘my_wp_nav_menu_args’ );

    Thank you in advance for any help