[Support request] using generate-disable-mobile plugin

Home Forums Support [Support request] using generate-disable-mobile plugin

Home Forums Support using generate-disable-mobile plugin

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #387948
    Bisola

    Hi, I’m using the generate-disable-mobile plugin and it’s working fine. However, the screen on the mobile is not taken up by the whole page so the user may need to zoom in or adjust it themselves.

    I was wondering if there was a way to allow the whole screen to be taken up by the page.

    Thank you in advance of any help you guys can provide.

    #388058
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the page?

    Thanks!

    #388098
    Bisola

    http://www.mycryptopedia.com/

    If you visit it on your phone you’ll see what I mean

    #388169
    Leo
    Staff
    Customer Support
    #388401
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Instead of using that plugin, we can now do this:

    add_fiter( 'generate_meta_viewport', 'tu_disable_mobile' );
    function tu_disable_mobile() {
        return '<meta name="viewport" content="width=1024">';
    }

    1024 being your container width.

    #388453
    Bisola

    Hello Tom thank you for the response,

    Where exactly do I add that piece of code?

    Thank you in advance for your response.

    #388729
    Bisola

    I would really appreciate a response as this is an issue I’d like to solve as quickly possible.

    Thank you for anyone that can response

    #388740
    Leo
    Staff
    Customer Support
    #392052
    Bisola

    Hi Tom and Leo, I was able to successfully implement your suggestions so thank you so much for the help.

    I was going to ask if it was also disable mobile version for some pages but leave it as mobile version for some other pages?

    Thank you in advance of any help you are able to provide

    #392268
    Leo
    Staff
    Customer Support

    You can use conditional tags like this:

    add_fiter( 'generate_meta_viewport', 'tu_disable_mobile' );
    function tu_disable_mobile() {
        if ( is_page( 'my-page' ) ) {
             return '<meta name="viewport" content="width=1024">';
        }
    }

    More info here: https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page

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