WordPress.org

Ready to get started?Download WordPress

Forums

Fatal Error: get_header not working (3 posts)

  1. adamj3333
    Member
    Posted 4 years ago #

    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 http://www.turnupmyworkout.com/blog

    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;'); ?>
    				</div>
    
    		<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>
    
    			</div>		
    
    <?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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    
    <head profile="http://gmpg.org/xfn/11">
    <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="http://www.turnupmyworkout.com/style.css" 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">
    
    </style>
    
    <?php wp_head(); ?>
    </head>
    <body>
    <div class="main_container">
    
    <div id="header">
    		<div id="marketing_message">
    
    <h1>Motivating you with music to lose weight and get fit</h1>
    
    </div>
    
    <div id="logo"><a href="http://www.turnupmyworkout.com"><img src="/images/logo.png" alt="Turnupmyworkout logo" border="0px"/></a></div>   	
    
    <ul id="list-nav">
    <li><a href="http://www.turnupmyworkout.com">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>
    </ul>
    
    </div> </div>

    Any help would be greatly appreciated. Thank you.

    Adam

  2. adamj3333
    Member
    Posted 4 years ago #

    UPDATE: I have tried switching over to a classic WordPress theme and I still get the same error.

  3. esmi
    Forum Moderator
    Posted 4 years ago #

    Please don't post huge chunks of code here. For larger blocks of code, use the WordPress pastebin and post the pastebin url here. It makes life easier for everyone.

    Sounds like you have core file damage somewhere - which, in turn, could be the outward sign of a hack.

    http://codex.wordpress.org/FAQ_My_site_was_hacked
    http://wordpress.org/support/topic/268083#post-1065779
    http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/

Topic Closed

This topic has been closed to new replies.

About this Topic