Forum Support

 
Advanced Search


New Posts
FAQs for Wordpress
If you have a question about Wordpress products please read through a list of our most commonly asked questions here.
[1]

Offline nerdz
Free Member
Posts: 78
Posted on: January 07, 2013, 10:49:51 PM

I get this error from my iPhone when I view the website with "Show me the PC Version." Mobile version seem fine but this only comes up if you want to view it as a normal site

Code:
Warning: Cannot modify header information - headers already sent by (output started at /www/wp-content/themes/s5_paradigm_shift/index.php:17) in/www/pccmg/wp-content/themes/s5_paradigm_shift/vertex/includes/vertex_includes_header.php on line9

Warning: Cannot modify header information - headers already sent by (output started at /www/pccmg/wp-content/themes/s5_paradigm_shift/index.php:17) in/www/pccmg/wp-content/themes/s5_paradigm_shift/vertex/includes/vertex_includes_header.php on line11
Logged

Offline Tristan Rineer
Free Member
Posts: 3858
Posted on: January 08, 2013, 08:31:19 AM

Sorry about that.  I already know what the problem is, and I thought I had already uploaded a fixed version of the theme and shaper.  I'll get new versions uploaded right away, but just so you don't have to re-download and risk overwriting any changes you've made, here's the edits you can make to fix it:

I was going to do line numbers, but it's easier to just overwrite the entire file, so...

Open "{themedir}/vertex/includes/vertex_includes_header.php", select all text in the file, delete the text, and replace it with the following:

Code:
<?php
require('wp_vars.php');
// Mobile device settings
if ($s5_mobile_device_enable_disable == "enabled") {
  require(
dirname(__FILE__)."/../../vertex/mobile_device_detect.php");
  
mobile_device_detect();
  if(isset(
$_GET['switch'])){
    
$mobile $_GET['switch']; // should be either 1 for true or empty for false
    
$_SESSION['switch'] = $_GET['switch']; //Set a session cookie
    
if(isset($_SERVER['HTTP_REFERER'])){ // if the referer is set send the user there
      
if(!headers_sent())
      {
header('Location:'.str_replace('?mobile','',$_SERVER['HTTP_REFERER']));
       exit;}
      else{
        exit(
'<meta http-equiv="refresh" content="0; url=' str_replace('?mobile','',$_SERVER['HTTP_REFERER']) . '"/>');
        
# | exit('<script>document.location.href=' . str_replace('?mobile','',$_SERVER['HTTP_REFERER']) . ';</script>');
    
return;
      }
    }
  }else if(isset(
$_SESSION['switch'])&&!isset($_GET['mobile'])){ // if the cookie is set use it
    
$mobile $_SESSION['switch'];
  }else{ 
// else use the function to detect if it's a mobile or not
    
$mobile mobile_device_detect();
  }
}
if (
$s5_mobile_device_enable_disable == "disabled") {$mobile false;}
if (
$mobile==true) { require(dirname(dirname(__FILE__))."/mobile_device_menu.php");}
?>


<meta http-equiv="Content-Type" content="text/html;" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<?php if($mobile==true){ ?>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=1;" />
<meta name="apple-touch-fullscreen" content="YES" />
<?php ?>

<?php if ($mobile == false && $s5_show_menu == "show") { require(dirname(dirname(__FILE__))."/call_menu.php");
?>

<?php require(dirname(dirname(__FILE__))."/css_and_js.php"); ?>
<?php wp_head();

if((
get_post_meta($post->ID'_s5_content'true) == 'Hidden') && is_single()){$s5_show_component 'no';}

?>


That will overwrite the lines that cause the header error.

UPDATE: The downloads have been updated, so you can just download the theme and copy the single file from the zip to your server if you feel that would be easier.
« Last Edit: January 08, 2013, 08:48:36 AM by Tristan Rineer »
Logged

Offline nerdz
Free Member
Posts: 78
Posted on: January 08, 2013, 10:49:17 PM

Awesome support Tristan  Wink

Works now.
Logged
[1]

Jump to:  


Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Page created in 0.022 seconds with 23 queries.
Need some help getting your site up and running? Be sure to check out our tutorials area, post on the forum or hire us
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.