New Landing How can we help? Themeforest Theme Support Neighborhood Login link on Mobile view

Viewing 10 posts - 1 through 10 (of 10 total)
  • #138519
    turkkepit
    Member
    Post count: 1

    Login link doesn’t appear on the Mobile view. If u add a login icon in the new versiyon, it would be nice…

    #138543
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide me your website url so i can assist you easily.
    Thanks
    Mohammad

    #138628
    turkkepit
    Member
    Post count: 1

    Of course..
    Web site: https://turkkepit.com

    #138630
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please insert this custom php code at functions.php of child theme.

    <?php
    add_filter( 'wp_nav_menu_items', 'sf_loginout_menu_link', 10, 2 );
    
    function sf_loginout_menu_link( $items, $args ) {
       if ($args->theme_location == 'main_navigation') {
          if (is_user_logged_in()) {
             $items .= '<li class="custom_mobile"><a href="'. wp_logout_url() .'">Log Out</a></li>';
          } else {
             $items .= '<li class="custom_mobile"><a href="'. wp_login_url(get_permalink()) .'">Log In</a></li>';
          }
       }
       return $items;
    }
    ?>

    Thanks
    Mohammad

    #189829
    tolents
    Member
    Post count: 5

    Hi Mohammad,

    Same thing is happening to my site. But upon checking my child theme files there’s NO functions.php inside the folder.

    Please help me with this.

    http://www.flyingdutchman.ph

    Thanks!

    #190255
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Just create a new file called functions.php and paste Mohammad code inside.
    Let us know the result.

    -Rui

    #196022
    wildemaarten
    Member
    Post count: 105

    Hi,

    Can I insert a link in this css to route it to another loginpage?
    When i insert this it is routed to the WordPress login for the site (and they can see my login slug which i dont want to), i want it to route to my woocommerce account login page so they can login as a customer .
    Hope you can help me with this.

    Like this: https://www.taartenvanmaarten.nl/my-account/
    and not like in the screendump where it comes out now.

    Cheers,
    Maarten

    Attachments:
    You must be logged in to view attached files.
    #196032
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    
    add_filter( 'wp_nav_menu_items', 'sf_loginout_menu_link', 10, 2 );
    
    function sf_loginout_menu_link( $items, $args ) {
       if ($args->theme_location == 'main_navigation') {
          if (is_user_logged_in()) {
             $items .= '<li class="custom_mobile"><a href="'. wp_logout_url() .'">Log Out</a></li>';
          } else {
             $items .= '<li class="custom_mobile"><a href="https://www.taartenvanmaarten.nl/my-account/">Log In</a></li>';
          }
       }
       return $items;
    }

    Thanks
    Mohammad

    #196040
    wildemaarten
    Member
    Post count: 105

    Thanks a lot Mohammad!
    Fast and a big helping hand as always.

    Cheers Maarten

    #196042
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome. I’m glad that issue resolved.
    Thanks 🙂
    With Best Regards
    Mohammad

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register