Support » Fixing WordPress » Fatal Error: get_header not working

  • I didn’t touch anything in my theme folder and all of a sudden I am getting the following error.

    Fatal error: Call to undefined function get_header() in D:\Hosting\5129196\html\Blog\index.php on line 1

    I am not 100% sure what happened, but I am hoping someone can help. You can find the blog at

    but you probably need the code too…so here it is…

    For the index.php

    <?php get_header(); ?> <div id="content">
    	<?php if 
    (have_posts()) : ?>
    		<?php while (have_posts()) : 
    the_post(); ?>
    			<div class="main_container"><div 
    class="main_content"> <div class="main_blog" 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 &raquo;'); ?>
    		<p class="postmetadata"><?php if (function_exists
    ('the_tags')) { the_tags('Tags: ', ', ', '<br />'); } ?>Posted in <?
    php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); 
    ?>  <?php comments_popup_link('No Comments »', '1 Comment 
    »', '% Comments »'); ?></p>
    <?php endwhile; ?>
    		<div class="navigation">
    	<div class="alignleft"><?php next_posts_link('&laquo; Older 
    Entries') ?></div>		<div class="alignright"><?php 
    previous_posts_link('Newer Entries &raquo;') ?></div>
    <?php else : ?>
    		<h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that 
    isn't here.</p>
    </div>	</div></div></div>	<?php endif; ?>
    php get_sidebar(); ?></div><?php get_footer(); ?></div>

    For the header.php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="" <?php language_attributes(); ?>>
    <head profile="">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <link rel="stylesheet" href="" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <style type="text/css" media="screen">
    <?php wp_head(); ?>
    <div class="main_container">
    <div id="header">
    		<div id="marketing_message">
    <h1>Motivating you with music to lose weight and get fit</h1>
    <div id="logo"><a href=""><img src="/images/logo.png" alt="Turnupmyworkout logo" border="0px"/></a></div>   	
    <ul id="list-nav">
    <li><a href="">Back to the Beginning</a></li>
    <li><a href="/adam">Hi I'm Adam</a></li>
    <li><a href="/music">Turn Up The Music</a></li>
    <li><a href="/blog">Live Healthy</a></li>
    <li><a href="/contact">Contact</a></li>
    </div> </div>

    Any help would be greatly appreciated. Thank you.


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error: get_header not working’ is closed to new replies.