Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18839

    Hi,

    when I add some Link to the “Replete Header Small Menu” which has nothing assigned by default, then the “My Account” and “Log Out” Links are disappearing beside the search form – is this an intended behaviour?

    Thank you

    Tom

    #101128

    Hi,

    They are dummy links and will be replaced once you create a new Small Menu, you can edit the code on config-woocomerce > config.php, find this code

    if( is_user_logged_in() )
    {
    $current = $sub1 = $sub2 = $sub3 = "";
    if(is_account_page()) $current = "current-menu-item";
    if(is_page(get_option('woocommerce_change_password_page_id'))) $sub1 = "current-menu-item";
    if(is_page(get_option('woocommerce_edit_address_page_id'))) $sub2 = "current-menu-item";
    if(is_page(get_option('woocommerce_view_order_page_id'))) $sub3 = "current-menu-item";

    $output .= "<li class='$current account_overview_link'><a href='".$url['account_overview']."'>".__('My Account', 'avia_framework')."</a>";
    $output .= "<ul>";
    $output .= "<li class='$sub1 account_change_pw_link'><a href='".$url['account_change_pw']."'>".__('Change Password', 'avia_framework')."</a></li>";
    $output .= "<li class='$sub2 account_edit_adress_link'><a href='".$url['account_edit_adress']."'>".__('Edit Address', 'avia_framework')."</a></li>";
    $output .= "<li class='$sub3 account_view_order_link'><a href='".$url['account_view_order']."'>".__('View Order', 'avia_framework')."</a></li>";
    $output .= "</ul>";
    $output .= "</li>";
    $output .= "<li class='account_logout_link'><a href='".$url['logout']."'>".__('Log Out', 'avia_framework')."</a></li>";
    }

    Regards,

    Ismael

    #101129

    I found another solution for those who don’t want to touch the code:

    I created a user defined menu in WP Menu manager and added a Link named “My Account” with the “use as mega menu” option, below I added the “view order”, “change password”, etc. the logout link gets automatically added beneath this menu when the woocommerce > settings > pages > logout link option is selected.

    The mega menu option helps to save space up there and looks very well.

    (descriptions above may vary since I use a german version)

    Hope that helps others

    Tom

    #101130

    Hi,

    @gsTom: Glad you found a solution. Thanks for the tip. :)

    Regards,

    Ismael

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

The topic ‘Header small menu, my account and log out links disappear when adding link’ is closed to new replies.