WordPress.org

Forums

Page Not Loading Theme (1 post)

  1. jimmyjohn
    Member
    Posted 8 years ago #

    I've created a preliminary theme that I'm just trying to get to load, under the name schedule.php:

    <?php
    /*
    Template Name: Schedule
    */
    ?>

    <?php get_header(); ?>

    <div id="content">

    <?php include(TEMPLATEPATH."/l_sidebar.php");?>

    <div id="contentmiddle">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php the_excerpt());?>

    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    <?php posts_nav_link(' — ', __('« go back'), __('keep looking »')); ?>
    </div>

    <?php include(TEMPLATEPATH."/r_sidebar.php");?>

    </div>

    <!-- The main column ends -->

    <?php get_footer(); ?>

    The code works just fine if I load it into archive.php and then load a given month's posts.
    I set up another page, "Schedule", with schedule.php as its template, expecting it to produce the same results as the archive page with this code, but instead I'm getting nothing.
    It's simply not accessing The Loop.
    Where are I going wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic