File: /home/heewonvps_17/drug-injury-lawyer.com/wp-content/themes/master/single.php
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Master Theme
*/
// Edited by craig to remove soft 404 causeing this error message on blog posts
// Fatal error: Class 'MobileDTS' not found in /home/druginju/public_html/wp-content/themes/master/single.php on line 29
/*include 'Mobile_Detect.php';
global $is_mobile;
session_start();
$type = null;
$uri = null;
$detect = new Mobile_Detect();
if (isset($_GET['view'])) {
$type = $_GET['view'];
set_view_type($type);
}
if (isset($_SESSION['view_type'])) {
if ($_SESSION['view_type'] == 'mobile') {
$_SESSION['which_page'] = 'mobile';
} else if ($_SESSION['view_type'] == 'classic') {
$_SESSION['which_page'] = 'blog';
}
} else if (MobileDTS::is('android')) {
// User with a mobile device running Android OS
$_SESSION['which_page'] = 'mobile';
} else if ($detect->isTablet()) {
$_SESSION['which_page'] = 'blog';
} else if (MobileDTS::is('ios')) {
// User with a mobile device running iOS
$_SESSION['which_page'] = 'mobile';
} else if (MobileDTS::is('mobile')) {
// User with a mobile device (any, even 10 years old mobile phones)
$_SESSION['which_page'] = 'mobile';
} else {
// User with a desktop device
$_SESSION['which_page'] = 'blog';
}
*/
get_header($_SESSION['which_page']); ?>
<div id="container">
<div id="content" role="main">
<?php
/* Run the loop to output the post.
* If you want to overload this in a child theme then include a file
* called loop-single.php and that will be used instead.
*/
get_template_part( 'loop', 'single' );
?>
</div><!-- #content -->
</div><!-- #container -->
//<?php if ($_SESSION['which_page'] != 'mobile') { get_sidebar('blog'); } ?>
//<?php get_footer($_SESSION['which_page']); ?>