Linking to archives.php? (3 posts)

  1. calvinccc
    Posted 9 years ago #

    Hi there,

    I'm trying to put a link in my header to an archives page listing all my entries. I'm working with the default wordpress theme, and discovered a file called 'archives.php' in the theme's directory. However, when I try to link to it using:

    ...bloginfo('template_directory'); ?>/archives.php">

    ...in the header, I get the following error message in my browser:
    'Fatal error: Call to undefined function: get_header() in /Sites/wordpress/wp-content/themes/mytheme/archives.php on line 7'

    Please help?

  2. moshu
    Posted 9 years ago #

    Never try to link to ANY template file directly (except index). It will not work.
    archives.php is a Page template file - read about it: http://codex.wordpress.org/Pages

  3. calvinccc
    Posted 9 years ago #

    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.