WordPress.org

Ready to get started?Download WordPress

Forums

Yet another Fatal error: Call to undefined function get_header() problem (3 posts)

  1. vixicana
    Member
    Posted 1 year ago #

    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(); ?>
  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Try:

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

    Then put your loop in a div.

    Check your header.php file for errors.

  3. vixicana
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.