Remove/disable mobile layout

January 2013 WordPress Theme
GK User
Fri Nov 08, 2013 1:04 pm
Hello, how can i remove or disable mobile layout? i want just display desktop.

Thank you
User avatar
Fresh Boarder

GK User
Fri Nov 08, 2013 1:15 pm
Please edit file:
/wp-content/themes/News/layouts/responsive_css.php
and remove those lines:
Code: Select all
<link rel="stylesheet" href="<?php echo gavern_file_uri('css/desktop.small.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_theme_width', '1230'); ?>px)" />

<link rel="stylesheet" href="<?php echo gavern_file_uri('css/tablet.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_tablet_width', '1030'); ?>px)" />

<link rel="stylesheet" href="<?php echo gavern_file_uri('css/tablet.small.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_small_tablet_width', '820'); ?>px)" />

<link rel="stylesheet" href="<?php echo gavern_file_uri('css/mobile.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_mobile_width', '580'); ?>px)" />
User avatar
Moderator

GK User
Fri Nov 08, 2013 1:26 pm
Cyberek wrote:Please edit file:
/wp-content/themes/News/layouts/responsive_css.php
and remove those lines:
Code: Select all
<link rel="stylesheet" href="<?php echo gavern_file_uri('css/desktop.small.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_theme_width', '1230'); ?>px)" />

<link rel="stylesheet" href="<?php echo gavern_file_uri('css/tablet.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_tablet_width', '1030'); ?>px)" />

<link rel="stylesheet" href="<?php echo gavern_file_uri('css/tablet.small.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_small_tablet_width', '820'); ?>px)" />

<link rel="stylesheet" href="<?php echo gavern_file_uri('css/mobile.css'); ?>" media="(max-width: <?php echo get_option($tpl->name . '_mobile_width', '580'); ?>px)" />



This is the code

<?php

/**
*
* Template part loading the responsive CSS code
*
**/

// create an access to the template main object
global $tpl;
global $fullwidth;

// disable direct access to the file
defined('GAVERN_WP') or die('Access denied');

?>

<style type="text/css">
.gk-page { max-width: <?php echo get_option($tpl->name . '_template_width', 1230); ?>px; }
<?php if(
get_option($tpl->name . '_sidebar_position', 'right') != 'none' &&
gk_is_active_sidebar('sidebar') &&
($fullwidth != true)
) : ?>
#gk-mainbody-columns > aside { width: <?php echo get_option($tpl->name . '_sidebar_width', '30'); ?>%;}
#gk-mainbody-columns > section { width: <?php echo 100 - get_option($tpl->name . '_sidebar_width', '30'); ?>%; }
#gk-mainbody-columns { background-position: <?php echo (get_option($tpl->name . '_sidebar_position', 'right') == 'right') ? 100 - get_option($tpl->name . '_sidebar_width', '30') : get_option($tpl->name . '_sidebar_width', '30'); ?>% 0!important; }
<?php else : ?>
#gk-mainbody-columns > section { width: 100%; }
<?php endif; ?>

<?php if(
get_option($tpl->name . '_inset_position', 'right') != 'none' &&
gk_is_active_sidebar('inset') &&
($fullwidth != true)
) : ?>
#gk-inset { width: <?php echo get_option($tpl->name . '_inset_width', '30'); ?>%;}
#gk-content-wrap { width: <?php echo 100 - get_option($tpl->name . '_inset_width', '30'); ?>%; }
#gk-mainbody-columns > section { background-position: <?php echo (get_option($tpl->name . '_inset_position', 'right') == 'right') ? 100 - get_option($tpl->name . '_inset_width', '30') : get_option($tpl->name . '_inset_width', '30'); ?>% 0!important; }
<?php else : ?>
#gk-content-wrap { width: 100%; }
<?php endif; ?>

<?php if(
get_option($tpl->name . '_inner_inset_position', 'right') != 'none' &&
gk_is_active_sidebar('inner_inset') &&
($fullwidth != true)
) : ?>
#gk-inner-inset { width: <?php echo get_option($tpl->name . '_inner_inset_width', '30'); ?>%;}
#gk-mainbody > div { width: <?php echo 100 - get_option($tpl->name . '_inner_inset_width', '30'); ?>%; }
<?php else : ?>
#gk-mainbody > div { width: 100%; }
<?php endif; ?>

</style>

<?php
// check the dependencies for the desktop.small.css file
if(get_option($tpl->name . "_shortcodes3_state", 'Y') == 'Y') {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-shortcodes-template'), false, '(max-width: '. get_option($tpl->name . '_theme_width', '1230') . 'px)');
} elseif(get_option($tpl->name . "_shortcodes2_state", 'Y') == 'Y') {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-shortcodes-elements'), false, '(max-width: '. get_option($tpl->name . '_theme_width', '1230') . 'px)');
} elseif(get_option($tpl->name . "_shortcodes1_state", 'Y') == 'Y') {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-shortcodes-typography'), false, '(max-width: '. get_option($tpl->name . '_theme_width', '1230') . 'px)');
} else {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-extensions'), false, '(max-width: '. get_option($tpl->name . '__theme_width', '1230') . 'px)');
}

// tablet.css is always loaded after the desktop.small.css file
wp_enqueue_style('gavern-tablet', gavern_file_uri('css/tablet.css'), array('gavern-extensions'), false, '(max-width: '. get_option($tpl->name . '_tablet_width', '1030') . 'px)');

// tablet.small.css is always loaded after the tablet.css file
wp_enqueue_style('gavern-tablet-small', gavern_file_uri('css/tablet.small.css'), array('gavern-tablet'), false, '(max-width: '. get_option($tpl->name . '_small_tablet_width', '820') . 'px)');

// mobile.css is always loaded after the tablet.small.css file
wp_enqueue_style('gavern-mobile', gavern_file_uri('css/mobile.css'), array('gavern-tablet-small'), false, '(max-width: '. get_option($tpl->name . '_mobile_width', '580') . 'px)');
User avatar
Fresh Boarder

GK User
Sat Nov 09, 2013 1:19 pm
Code: Select all
<?php
// check the dependencies for the desktop.small.css file
if(get_option($tpl->name . "_shortcodes3_state", 'Y') == 'Y') {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-shortcodes-template'), false, '(max-width: '. get_option($tpl->name . '_theme_width', '1230') . 'px)');
} elseif(get_option($tpl->name . "_shortcodes2_state", 'Y') == 'Y') {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-shortcodes-elements'), false, '(max-width: '. get_option($tpl->name . '_theme_width', '1230') . 'px)');
} elseif(get_option($tpl->name . "_shortcodes1_state", 'Y') == 'Y') {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-shortcodes-typography'), false, '(max-width: '. get_option($tpl->name . '_theme_width', '1230') . 'px)');
} else {
wp_enqueue_style('gavern-desktop-small', gavern_file_uri('css/desktop.small.css'), array('gavern-extensions'), false, '(max-width: '. get_option($tpl->name . '__theme_width', '1230') . 'px)');
}

// tablet.css is always loaded after the desktop.small.css file
wp_enqueue_style('gavern-tablet', gavern_file_uri('css/tablet.css'), array('gavern-extensions'), false, '(max-width: '. get_option($tpl->name . '_tablet_width', '1030') . 'px)');

// tablet.small.css is always loaded after the tablet.css file
wp_enqueue_style('gavern-tablet-small', gavern_file_uri('css/tablet.small.css'), array('gavern-tablet'), false, '(max-width: '. get_option($tpl->name . '_small_tablet_width', '820') . 'px)');

// mobile.css is always loaded after the tablet.small.css file
wp_enqueue_style('gavern-mobile', gavern_file_uri('css/mobile.css'), array('gavern-tablet-small'), false, '(max-width: '. get_option($tpl->name . '_mobile_width', '580') . 'px)');


remove this part.
User avatar
Moderator


cron