How To Force Desktop View On Mobile

Hi, I understand after reading a lot of support threads that X Theme by nature is responsive and therefore forcing a desktop view on all mobile devices by default is pretty complex. However it looks like there was a solution you all were offering on this thread that was pretty simple.

I’m just wondering if you could clarify the updated step-by-step that you were recommending - for the benefit of other users - as I’m not sure which of the instructions on this thread were tailored to this particular individual’s website.

Basically, I’m done building my site for the most part and not looking forward to tweaking it all now for a good look on mobile. I like it so much that I wouldn’t mind forcing the desktop view on mobile for everybody and just letting them zoom into things.

Thanks for any help.

Hi Jacob,

Thank you for reaching out to us. Forcing the desktop view on mobile devices is not recommended at all as this may break the site’s layout, however if you still want to display the desktop version on mobile devices then please setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

Then create a new file _meta.php and paste the following code inside:

<?php

// =============================================================================
// VIEWS/GLOBAL/_META.PHP
// -----------------------------------------------------------------------------
// Outputs meta data into the <head> of the site.
// =============================================================================

?>

<meta charset="<?php bloginfo( 'charset' ); ?>">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

Save the file and upload it to /x-child/framework/views/global directory in your child theme..

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Hope this helps!

Nabeel, this is perfect. Thank you. I only need it for a temporary amount of time until I can get someone with more web designing skills than me to work on the site :smiley:

I will follow these directions and report back, thank you.

If I break my site doing this, restoring a backup will fix it again right? I only ask, because I’m still trying to locate my directory :blush:

Hello Jacob,

If you break something, you can simply delete the added file in your child theme. Restoring with the backup is good especially for worst case scenarios. If you have your child theme installed and all your modifications were added in the child theme, when the site breaks, the problem is only present in the child theme so that can easily be resolved by switching to the parent theme or by removing any modifications added in the child theme.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.