hide loginbox on mobile

This topic contains 7 replies, has 2 voices, and was last updated by  Simone 8 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #41760

    Joel
    Expired Member
    Post count: 9

    Is there a way to hide loginbox when its accessed on a mobile device? The widget looks ugly on mobile and I definitely prefer the menu icon.

    Thanks!

    -Joel

    #41763

    Simone
    Expired Member
    Post count: 3515

    Hi Joel, you can achieve this using the plugin Widget Logic, here https://wordpress.org/plugins/widget-logic/ .
    Once you install it, go to your Loginbox widget and add the following condition in the logic area

    !wp_is_mobile()

    this will show the widget only on “not mobile” devices

    #41765

    Joel
    Expired Member
    Post count: 9

    This didn’t seem to work. I can still see the loginbox on my iphone.

    #41766

    Simone
    Expired Member
    Post count: 3515

    hmmm…try with the following

    (wp_is_mobile()==false)

    remember to delete your cache

    #41768

    Joel
    Expired Member
    Post count: 9
    This reply has been marked as private.
    #41808

    Simone
    Expired Member
    Post count: 3515

    Ok, now I had the chance to test it, with the following you’ll do the trick ((tested))

    ! wp_is_mobile()
    #41818

    Joel
    Expired Member
    Post count: 9
    This reply has been marked as private.
    #41855

    Simone
    Expired Member
    Post count: 3515

    I’m glad 🙂 you’re welcome

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket