Fatal error undefined function get_header() in index.php on line 1
-
Although this doesn’t affect the site I’d like to get it removed from the error log, permanently. I get the following error appear daily. I don’t use the index.php file in my theme so I could, ultimately, just remove all content from that file but it’d be nice to know why it happens.
[25-Oct-2016 23:15:38 UTC] PHP Fatal error: Call to undefined function get_header() in /home/mysite/public_html/site/wp-content/themes/sitetheme/index.php on line 1
Here’s the code on that page:
<?php get_header(); ?> <div id="primary" role="main"> <?php while ( have_posts() ) : the_post(); ?> <h1 class="title"><?php the_title(); ?></h1> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<p><strong>'.__('Pages:', 'framework').'</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> <!--END .entry-content --> </div> <?php endwhile; // end of the loop. ?> </div><!-- #content --> <?php get_footer(); ?>
Any ideas?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Fatal error undefined function get_header() in index.php on line 1’ is closed to new replies.