how to force desktop view

  • Unknown's avatar

    greetings,

    i just built my site + think that it looks good on desktop; but when i view it on my phone – as most people will be doing – the formatting is all off. is there a way to force the website to be seen as the desktop view across all devices? if so, can you let me know how to do this? i’m not skilled in code + don’t know where to go or how to fix it. perhaps there’s a setting i can modify to make this happen? the only things online i’ve been able to find is to insert a code into the header via the editor, but i don’t know how to do that. thanks for your help!

  • Unknown's avatar

    Hi,
    Can we have your site url please ?

    Most of the site are nowadays built with responsive code i.e. it changes the site according to the device it is viewed upon. I do not know if it would be possible to force desktop view. Please wait if someone in the forum can guide us.

    there are however ways to do it with custom code like for normal sites. I have not tried it on wordpress sites (please try at your own risk)

    You just need to set the Viewport

    <meta name="viewport" content="width=1024">
    Instead of this (Responsive version)

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    Look at here. Should solve your issue.

    or

    `var viewMode = getCookie(“view-mode”);
    if(viewMode == “desktop”){
    viewport.setAttribute(‘content’, ‘width=1024’);
    }else if (viewMode == “mobile”){
    viewport.setAttribute(‘content’, ‘width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no’);
    }’

    Please note that these forums are for WordPress.com hosted sites only. If your site is using the open-source WordPress.org software you need to seek help at these forums:
    https://wordpress.org/support/forums/

    Thanks

  • The topic ‘how to force desktop view’ is closed to new replies.