• Resolved zomb1equeen

    (@zomb1equeen)


    im working on creating my first theme (using a video tutorial). I typed out everything the person said to do, yet my Loop doesnt work. When I put the code in, all that shows up on my site is the

    <?php else : ?>

    part, instead of my test posts.

    Here is what I have. Can anyone help me out and tell me what I’m doing wrong?? I really appreciate it! My site is http://www.vegansutra.com, if you need to see the source for whatever reason

    `<!– BEGIN CONTENT –>
    <div id=”main”>
    <div id=”primary”>

    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>

    <div class=”post-date”>
    <div class=”day”><?php the_time(‘d’)?></div>
    <div class=”month”><?php the_time(‘M’)?></div>
    </div>

    <div class=”post-item”>
    <img src=”<?php echo bloginfo(‘template_directory’) . ‘/images/pic-01.png’; ?>” alt=”post image” />
    <h2><?php the_title(); ?></h2>
    <p class=”meta”>Category Parent | Child</p>
    <p>
    Lorem ipsum dolor sit amet, sit diam ut sed jus consequat nunc incassum fatua,
    sed genitus, virtus, saepius pagus. Autem bene ingenium aptent aliquam inhibeo,
    accumsan nonummy proprius pneum reprobo letalis vindico duis elit.
    </p>
    <a href=”#” class=”more-link”>Continue Reading »</a>

    </div> <!– end post-item –>

    <?php endwhile; ?>

    <?php else : ?>
    <p>I’m not sure what you’re looking for.</p>
    <?php endif; ?>

    <!– page-navigation –>
    <div class=”page-navigation”>

    <div class=”left”><a href=””><img src=”<?php echo bloginfo(‘template_directory’) . ‘/images/nav/prevbutton.png’; ?>” border=”0″ /></a></div>

    <div class=”right”><a href=””><img src=”<?php echo bloginfo(‘template_directory’) . ‘/images/nav/nextbutton.png’; ?>” border=”0″ /></a></div>

    </div>

    </div> <!–End of “primary”–>
    `

The topic ‘WordPress Loop Doesn't Work’ is closed to new replies.