WP Php Fatal Error, Need help

PHPNewb

New member
Jul 8, 2009
3
0
0
I recently created a wordpress custom template. I used the default wordpress theme as my canvas. I edited the default style.css file to replace all the default images with the images I created. The site looks good in dreamweaver and everything works good on the local server I set up. After uploading the site from dreamweaver to my server via ftp i get this: "Fatal error: Call to undefined function get_header() in /home/collegec/public_html/index.php on line 1." Aftermessing around with my code Ihave come to figure out that it is not my get_header that is the problem, because if I erase the get_header from my index.php I get another fatal error but instead of get_header it goes to the next php code after get_header and says that this php code is now the error. I am a complete newb when it comes to php, but it seems like my website is not reading my php code for some reason. Any help on this situation will be great.
 


here is the index.php

<?php get_header(); ?>
<p>
<div id="contentTOP">
</div>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
</div>
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
 
Did you upload the theme to the document root instead of putting it in the themes directory?

It should be something like /home/collegec/public_html/wp-content/themes/default/index.php - where "default" is the name of your theme.

if you've installed WP in the document root the WP hierarchy will be

/home/collegec/public_html/wp-admin/*
/home/collegec/public_html/wp-content/*
/home/collegec/public_html/wp-includes/*
/home/collegec/public_html/index.php <-- this loads WP, it's not where your theme goes

and a bunch of /home/collegec/public_html/wp-* files


It looks like that's what you did.

The error is telling you that there is no "get_header()" function (or any of the others) defined anywhere, which means it wasn't loaded by WP.
 
ok I got everything straightened out for the most part. In wordpress when i try to install the theme i get these two errors:

Warning: file(/home/collegec/public_html/wp-content/themes/ChrisWP1/style.css) [function.file]: failed to open stream: No such file or directory in /home/collegec/public_html/wp-includes/theme.php on line 180

Warning: implode() [function.implode]: Invalid arguments passed in /home/collegec/public_html/wp-includes/theme.php on line 180

if anyone knows what I need to change to get rid of these two errors it will be greatly appreciated
 
The first error is telling you that you don't have the required 'style.css' in your theme directory.

The second is, more than likely, a result of the first.