Josh Rosenbaum
asked 9 years ago

Hello. I had a question concerning the responsive layout of the theme. Our website is meant to be viewed on desktops primarily, and our school’s computers don’t have a great resolution. Due to the small resolutions, the website displays as a mobile site. It isn’t appropriate.
Is there custom code I can add to where it only displays in desktop mode. DW Focus is the theme at question.

1 Answers
DominicStaff
answered 9 years ago

Hi,
To resolve this issue please follow my instruction here:
1. Open header.php in /wp-content/themes/dw-focus/header.php
2. Replace following code –  line 11 

    <meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport">

with: 

    <meta content="width=1100" name="viewport">

3. Open dw-focus-carousel.php file in /wp-content/themes/dw-focus/inc/widgets/dw-focus-carousel.php 
4. Replace following code – form line 65 to line 71 

   if( is_mobile() || is_kindle() || is_samsung_galaxy_tab() || is_nexus() ){
$col = 1; $row = 1;
$size = 'large';
} else {
$col = 4; $row = 4;
$size = 'medium';
}

with:

   // if( is_mobile() || is_kindle() || is_samsung_galaxy_tab() || is_nexus() ){
// $col = 1; $row = 1;
// $size = 'large';
// } else {
$col = 4; $row = 4;
$size = 'medium';
// }

5. Add following code to Header code in Dashboard / Appearance / Customize

   <style>
@media (min-width: 1080px) {
.widget.dw_focus_videos [class*=span].hentry {
float: left;
margin-left: 3.8461538461538463%;
}
.widget.dw_focus_videos [class*=span].hentry:first-child {
margin-left: 0;
}
}
</style>

Hope this helps!

Powered by DW Question & Answer Pro