• Resolved IvanovSI

    (@ivanovsi)


    I am making an offline site of a currently live site so that I may add things to it and make changes and make sure that they don’t mess everything up. I have installed wordpress on the local server, then imported the .sql files from the live site in to the offline one. If it makes a diffrence the live site is on version 3.4.2 if that does any things also here is the link to it :
    Link

    Then I upload the theme to the site. When I check the site its all blank. I have no-plugins so thats not the issue, then I switched to the twenty elven theme and it worked just fine.

    For some reason, the theme that works fine on the live site does not work on the offline site.

    When I look at the source code on the blank page it turns out that only loads part of the header.php and on top of that it doesn’t even load the entire thing. So my logical explanation is that something is wrong with the header.php
    Also just a note, I did not make this, so If you see some strange things that should not be there, tell me please.

    So this is what I copied from the Editor

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head profile="http://gmpg.org/xfn/11">
    
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    		<title><? if ( is_home() ) { bloginfo('name'); echo(' — '); bloginfo('description'); } else wp_title('',true); ?></title>
    
    		<? wp_head(); ?>
    
    		<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp-content/themes/nyce/style.css?" />
    		<link rel="stylesheet" type="text/css" media="print" href="/wp-content/themes/nyce/print.css" />
    
    		<link rel="pingback" href="<? bloginfo('pingback_url'); ?>" />
    		<link rel="alternate" type="application/rss+xml" title="<? bloginfo_rss('name'); ?>" href="<? bloginfo_rss('atom_url') ?>" />
    
    		<script src="/javascripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    		<script src="/javascripts/cufon.js" type="text/javascript"></script>
    		<script src="/javascripts/futura-med.font.js" type="text/javascript"></script>
    
    		<script type="text/javascript">
    			Cufon.replace('h1, h4, #menu-nav li a, #prod-list a, .product h3', { hover: true });
    			$(document).ready(function(){
    				$("div.box").hide();
    				$("div.headlines").show();
    
    				$("li#headlines a").click( function() {
    						$("div.signup").hide();
    						$("div.headlines").show();
    						$("li#signup").removeClass("active");
    						$("li#headlines").addClass("active");
    						return false;
    						});
    
    					$("li#signup a").click( function() {
    						$("div.headlines").hide();
    						$("div.signup").show();
    						$("li#headlines").removeClass("active");
    						$("li#signup").addClass("active");
    						return false;
    						});
    
    			});
    			</script>
    
    		<? if((is_home() && ($paged > 2 )) || is_date() || is_category()) { echo '<meta name="robots" content="noindex, follow, noarchive" />'; } ?>
    
    	</head>
    <!-- Stops loading everything past here -->
    	<?php
    	// Find body class to add to WP defaults
    	if(is_home()) { $body_class =  "home"; } elseif(is_child("company") || is_child(85) || is_child("technology") || is_child("applications") || is_child("order")|| is_child("contact-us") || is_child("products") || is_child("resources") || is_child("zigbee-wireless") || is_child("wireless-solutions") || is_archive() || is_single()) { $body_class =  "smaller"; } else { $body_class =  "sub"; }
    	?>
    
    	<body id="www_nycetechnology_com" <?php echo body_class( $body_class );?>>
    		<div class="header container">
    
    																				<div id="header">
    				<div id="logo"><a href="<? bloginfo('url'); ?>"><? bloginfo('name'); ?></a></div>
    				<h4><? bloginfo('description'); ?></h4>
    
    				<span class="reset"> </span>
    				<!-- Removing this removes the main menu-->
    				<?php wp_nav_menu(array('menu' => 'nav', 'depth' => '1')); ?>
    
    			</div></div><!-- /header -->
    
    			<div class="content container">
    				<div id="content"><div class="inner">

    But this is what it shows on the site

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head profile="http://gmpg.org/xfn/11">
    
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    		<title></title>
    
    		<link rel='index' title='NYCE Control' href='http://sandbox/wordpress' />
    <link rel='prev' title='Control 4 How to' href='http://sandbox/wordpress/?page_id=1161' />
    <link rel='next' title='Media Releases' href='http://sandbox/wordpress/?page_id=1476' />
    <link rel='canonical' href='http://sandbox/wordpress/' />
    
    		<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp-content/themes/nyce/style.css?" />
    		<link rel="stylesheet" type="text/css" media="print" href="/wp-content/themes/nyce/print.css" />
    
    		<link rel="pingback" href="http://sandbox/wordpress/xmlrpc.php" />
    		<link rel="alternate" type="application/rss+xml" title="NYCE Control" href="http://sandbox/wordpress/?feed=atom" />
    
    		<script src="/javascripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    		<script src="/javascripts/cufon.js" type="text/javascript"></script>
    		<script src="/javascripts/futura-med.font.js" type="text/javascript"></script>
    
    		<script type="text/javascript">
    			Cufon.replace('h1, h4, #menu-nav li a, #prod-list a, .product h3', { hover: true });
    			$(document).ready(function(){
    				$("div.box").hide();
    				$("div.headlines").show();
    
    				$("li#headlines a").click( function() {
    						$("div.signup").hide();
    						$("div.headlines").show();
    						$("li#signup").removeClass("active");
    						$("li#headlines").addClass("active");
    						return false;
    						});
    
    					$("li#signup a").click( function() {
    						$("div.headlines").hide();
    						$("div.signup").show();
    						$("li#headlines").removeClass("active");
    						$("li#signup").addClass("active");
    						return false;
    						});
    
    			});
    			</script>
    
    	</head>
    <!-- Stops loading everything past here -->

    Any help would be appreciated, sorry if there are horrendous grammatical errors and such, been trying to make this offline site work for a few days now

    *Edit and I just saw that there was a forum for offline sites. Sorry could a Mod move it to the right place

Viewing 8 replies - 1 through 8 (of 8 total)
  • try and replace all php shorttags <? with full ones <?php
    or try and find and edit the server settings to allow php shorttags.

    Thread Starter IvanovSI

    (@ivanovsi)

    I changed all the short tags to be fulls ones, nothing changed

    Thread Starter IvanovSI

    (@ivanovsi)

    Made a little progress … I dropped the Database then ran wordpress and re-made them. Now It shows a little bit of text, all of it unformated from the Foot and and Header. When I checked the Page Source I noticed that only 3 files are being loaded. Header.php, Index.php and Footer.php
    Page Source as it is right now

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head profile="http://gmpg.org/xfn/11">
    
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    		<title>SandBox 1 — Just another WordPress site</title>
    
    		<meta name='robots' content='noindex,nofollow' />
    <link rel='index' title='SandBox 1' href='http://sandbox/wordpress' />
    	<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
    
    		<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp-content/themes/nyce/style.css?" />
    		<link rel="stylesheet" type="text/css" media="print" href="/wp-content/themes/nyce/print.css" />
    
    		<link rel="pingback" href="http://sandbox/wordpress/xmlrpc.php" />
    		<link rel="alternate" type="application/rss+xml" title="SandBox 1" href="http://sandbox/wordpress/?feed=atom" />
    
    		<script src="/javascripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    		<script src="/javascripts/cufon.js" type="text/javascript"></script>
    		<script src="/javascripts/futura-med.font.js" type="text/javascript"></script>
    
    		<script type="text/javascript">
    			Cufon.replace('h1, h4, #menu-nav li a, #prod-list a, .product h3', { hover: true });
    			$(document).ready(function(){
    				$("div.box").hide();
    				$("div.headlines").show();
    
    				$("li#headlines a").click( function() {
    						$("div.signup").hide();
    						$("div.headlines").show();
    						$("li#signup").removeClass("active");
    						$("li#headlines").addClass("active");
    						return false;
    						});
    
    					$("li#signup a").click( function() {
    						$("div.headlines").hide();
    						$("div.signup").show();
    						$("li#headlines").removeClass("active");
    						$("li#signup").addClass("active");
    						return false;
    						});
    
    			});
    			</script>
    
    	</head>
    <!-- Stops loading everything past here -->
    
    	<body id="www_nycetechnology_com" class="home blog logged-in home">
    		<div class="header container">
    
    																				<div id="header">
    				<div id="logo"><a href="http://sandbox/wordpress">SandBox 1</a></div>
    				<h4>Just another WordPress site</h4>
    
    				<span class="reset"> </span>
    				<!--  t
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head profile="http://gmpg.org/xfn/11">
    
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    		<title>SandBox 1 — Just another WordPress site</title>
    
    		<meta name='robots' content='noindex,nofollow' />
    <link rel='index' title='SandBox 1' href='http://sandbox/wordpress' />
    	<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
    
    		<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp-content/themes/nyce/style.css?" />
    		<link rel="stylesheet" type="text/css" media="print" href="/wp-content/themes/nyce/print.css" />
    
    		<link rel="pingback" href="http://sandbox/wordpress/xmlrpc.php" />
    		<link rel="alternate" type="application/rss+xml" title="SandBox 1" href="http://sandbox/wordpress/?feed=atom" />
    
    		<script src="/javascripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    		<script src="/javascripts/cufon.js" type="text/javascript"></script>
    		<script src="/javascripts/futura-med.font.js" type="text/javascript"></script>
    
    		<script type="text/javascript">
    			Cufon.replace('h1, h4, #menu-nav li a, #prod-list a, .product h3', { hover: true });
    			$(document).ready(function(){
    				$("div.box").hide();
    				$("div.headlines").show();
    
    				$("li#headlines a").click( function() {
    						$("div.signup").hide();
    						$("div.headlines").show();
    						$("li#signup").removeClass("active");
    						$("li#headlines").addClass("active");
    						return false;
    						});
    
    					$("li#signup a").click( function() {
    						$("div.headlines").hide();
    						$("div.signup").show();
    						$("li#headlines").removeClass("active");
    						$("li#signup").addClass("active");
    						return false;
    						});
    
    			});
    			</script>
    
    	</head>
    <!-- Stops loading everything past here -->
    
    	<body id="www_nycetechnology_com" class="home blog logged-in home">
    		<div class="header container">
    
    																				<div id="header">
    				<div id="logo"><a href="http://sandbox/wordpress">SandBox 1</a></div>
    				<h4>Just another WordPress site</h4>
    
    				<span class="reset"> </span>
    				<!-- Removing this removes the main menu-->
    				<div class="menu"><ul><li class="page_item page-item-2"><a href="http://sandbox/wordpress/?page_id=2" title="About">About</a></li><li class="page_item page-item-8"><a href="http://sandbox/wordpress/?page_id=8" title="Blank Filler Pa">Blank Filler Pa</a></li><li class="page_item page-item-5"><a href="http://sandbox/wordpress/?page_id=5" title="Blank Filler Pag">Blank Filler Pag</a></li><li class="page_item page-item-3"><a href="http://sandbox/wordpress/?page_id=3" title="Blank Filler Page">Blank Filler Page</a></li></ul></div>
    
    			</div></div><!-- /header -->
    
    			<div class="content container">
    				<div id="content"><div class="inner"><!-- Main Index Page-->
    		<div class="products">
    
    		</div><!--products-->
    
    <!--Blank.. Well it was before this--><!-- Footer-->
    <span class="reset"></span>
    
    		</div></div></div><!-- /content -->
    
    		<div class="footer container">
    
    		<div id="footer">
    
    			<div class="alignleft">
    
    				<p class="bigger"><span>NYCE Control Inc.</span> Invisible Sensors for Life.</p>
    
    <!-- Change which menu is on the bottom (Changed 11.21.2012) Iavor Ivanov. Set it to menu naw -->
    
    			</div>
    
    			<div class="alignright">
    
    				<p>© 2012 NYCE Control Inc . All Rights Reserved.<br /></p>
    
    			</div>
    
    		</div></div><!-- /footer -->
    
    	</body>
    
    </html>
    
    he main menu-->
    				<div class="menu"><ul><li class="page_item page-item-2"><a href="http://sandbox/wordpress/?page_id=2" title="About">About</a></li><li class="page_item page-item-8"><a href="http://sandbox/wordpress/?page_id=8" title="Blank Filler Pa">Blank Filler Pa</a></li><li class="page_item page-item-5"><a href="http://sandbox/wordpress/?page_id=5" title="Blank Filler Pag">Blank Filler Pag</a></li><li class="page_item page-item-3"><a href="http://sandbox/wordpress/?page_id=3" title="Blank Filler Page">Blank Filler Page</a></li></ul></div>
    
    			</div></div><!-- /header -->
    
    			<div class="content container">
    				<div id="content"><div class="inner"><!-- Main Index Page-->
    		<div class="products">
    
    		</div><!--products-->
    
    <!--Blank.. Well it was before this--><!-- Footer-->
    <span class="reset"></span>
    
    		</div></div></div><!-- /content -->
    
    		<div class="footer container">
    
    		<div id="footer">
    
    			<div class="alignleft">
    
    				<p class="bigger"><span>NYCE Control Inc.</span> Invisible Sensors for Life.</p>
    
    			</div>
    
    			<div class="alignright">
    
    				<p>© 2012 NYCE Control Inc . All Rights Reserved.<br /></p>
    
    			</div>
    
    		</div></div><!-- /footer -->
    
    	</body>
    
    </html>

    Any help would be useful, also this is an offline server so I can try really crazy things to fix it..

    Interesting thing If I copy the code I pasted above put it in notpade and make and Html it looks like what the site does right now

    what is the code of index.php right now?

    seems to be fixed?

    the output of the link you posted right at the begininng validates (http://validator.w3.org/) and shows formatted header, content, and footer in FF17. the ‘products’, ‘support’, and ‘company’ pages show a sidebar as well.

    Thread Starter IvanovSI

    (@ivanovsi)

    The link I posted is the Main Online Website, Im trying to create an offline version of it, a sandbox so I can update the site with worrying about breaking it

    <? get_header(); ?>
    
    		<div class="products">
    			<a href="http://nyce-control.dev/products"><img src="/wp-content/uploads/2012/10/control-products-e1349390601493.png" /></a>
    		</div><!--products-->
    
    <? /*		<div id="main" class="post">
    		<? get_a_post(35); the_content(); ?>
    
    		</div><!-- /main -->
    */ ?>
    
    <? include(TEMPLATEPATH . '/news-signup.php'); get_footer(); ?>

    That is the Index.php

    Also I think theres a database problem on top of this, when ever I import the data base from the main site it only loads the header.php

    *Edit, So What I ment, was when I import the database with PhpMyAdmin it messes everything up(As in a complete blank page), but if I do it with WordPress it does not(As in there is at least some text and it loads the footer.

    Also any other pages just load the header, what I mean by that is if I go to the page and view the page source I only see the code that is in the header. Code is in the first post

    what is get_a_post(35); ?

    is that a custom function?

    otherwise, there is no code for the loop – http://codex.ww.wp.xz.cn/The_Loop

    is the Main Online Website also based on WordPress and using the same code?

    Thread Starter IvanovSI

    (@ivanovsi)

    Yes the main website is running the exact same code and its fine. And I honestly have no clue, but I think it might be.

    *Edit Just did a completely new and fresh install of wordpress and made sure it was the newest version (3.4.2) and still the same problem.

    Thread Starter IvanovSI

    (@ivanovsi)

    Last post, Found the problem.

    The person who was working on the site felt that extra Javascript files should not be placed in the folder with the theme, but rather store them in a separate folder in the index folder of the site.

    Thank you for you help.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Theme only loading header.php’ is closed to new replies.