• Hello,
    I have this message when I try to get on the page:

    Fatal error: Call to undefined function get_header()in D:\XAMPP\htdocs\wordpress\wp-content\themes\3yard\identyfikacja.php on line 5

    I’ve red several topics with this problem, but every suggest that there might be a problem with putting the content in the root directory. I have my template in wp-content/themes/my-theme directory. It works perfect with index, but not with the page. Dunno why. I found a tip somewhere to put @ before get_header, but this only makes the site go all white.

    my code

    <?php
    /*
    Template Name: identyfikacja
    */
    get_header(); ?>
    <?php query_posts ('cat=1&showposts=1');?>
    <?php if (have_posts()):while (have_posts()) :the_post();?>
    <?php the_content('');?>
    <?php endwhile;?>
    <?php endif;?>
    <?php wp_reset_query;?>
    <div id="pn">
    <div>
    <?php previous_post_link('%link', 'PREV', TRUE); ?> </div>
    <div><?php next_post_link('%link', 'NEXT', TRUE); ?>
    			</div>
    		</div>
    
    <?php get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try:

    <?php
    **
    * Template Name: identyfikacja
    */
    get_header(); ?>

    Then put your loop in a div.

    Check your header.php file for errors.

    Thread Starter vixicana

    (@vixicana)

    Nope, nothing has changed. Aren’t there too many *?
    There shouldn’t be any errors in header.php. It works perfect with index.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Yet another Fatal error: Call to undefined function get_header() problem’ is closed to new replies.