Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #548196

    Hello, i’ve used the posted on a previous thread and it’s working fine. But i need to create submenu itens on this login button, how can i make one submenu link for my-account for exemple?
    Here goes the link of the previous post i’ve used
    https://kriesi.at/support/topic/add-login-log-out-links-to-top-menu/
    Regards

    #548563

    Hey druzes,

    Could you provide us with a link to the site in question so that we can take a closer look please? I’m not sure I understand exactly what you are trying to achieve, could you try to explain a bit further as well?

    Best regards,
    Rikard

    #548710

    Hi, since i’ve created the “entrar” menu item with a code added in the functions.php file, i can’t add a submenu item, in the menu editor in the wordpress.
    The code i’ve added to the functions file was this:

    // Add Log in / log out links to top menu
    
    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
        if (is_user_logged_in() && $args->theme_location == 'avia') {
            $items .= '
  • Log Out
  • '; } elseif (!is_user_logged_in() && $args->theme_location == 'avia') { $items .= '
  • Log In
  • '; } return $items; }

    Now i need to create subitens on this menu with links for my-account page and other pages.
    Thank you for the support.

    • This reply was modified 9 years ago by Yigit. Reason: added code tags
    #549477

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Thanks,
    Rikard

    #549636

    Here it goes

    #549666

    Hi!

    Would adding your login and account buttons to your menu as custom links and hiding them to logged in/logged out users using custom CSS not work for you?

    If it would, you can go to Appearance > Menus and add new custom links and then click “Screen options” on the top right corner and check CSS classes and edit your menu items and give them custom CSS class and add following code to Quick CSS in Enfold theme options

    .logged-in .your-custom-login-button-class { display: none !important; }
    .logged-in .your-custom-account-button-class { display: block !important; }
    .your-custom-login-button { display: block; }
    .your-custom-account-button-class { display: none; }

    Regards,
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.