• I am just branching out into template pages and I am trying to get the loop to work in my custom theme. the meta data is showing up but not the content of my post.

    the code:

    <?php
    /*
    Template Name: blog
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="page-wrap" class="container_12 clearfix">
    
    <!-- The Loop -->
    
    <div class="grid_12">
       <? /*Begin Content area Query*/ ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <h2><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute();
    ?>"><?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php
    the_author() ?> --></small>
    <div class="entry">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>
    <p class="postmetadata"><?php the_tags('Tags: ', ', ', ''); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    </div>
    <?php endwhile; ?>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
    </div>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php get_search_form(); ?>
    <?php endif; ?>
    
    </div>
    <!-- End Loop -->
    
    </div>
    
    </div>
    
    <?php get_footer(); ?>

    [how to post code: http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘the loop’ is closed to new replies.