Support » Fixing WordPress » static blog page screws my loop

  • I`m building a custom themed wordpress website for a friend of mine.

    Since I have not been able to solve this in 12 hours, I decided to post this message.

    I have wordpress set up to display a different static front page, since the “posts” part is only a small part of the actual website (it`s located in a child category).

    To make things harder, I`m trying to use a custom template for the “posts” part.

    When I dont have a post page setup, I cant get the loop to work. If I do have it setup, I can`t modify it (because it throws the template out).

    Any ideas?

    Heres the code Im trying for the loop:

    <?php get_header(); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); /*start the loop */ ?>
    <?php /* show the post information */ ?>
    <h2 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    <?php /* show the post meat */ ?>
    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    <?php /* category + comment & edit */ ?>
    <p class="postmetadata">
    Posted in <?php the_category(', ') ?>
    <?php edit_post_link('Edit','','<strong>|</strong>'); ?>
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    <?php /* let users know when something is changed */ ?>
    <?php trackback_rdf(); ?>
    <?php endwhile; /* end the loop */?>
    <?php /* navigate posts */ ?>
    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></div>
    <?php /*something isn

    t there */ ?>
    <?php else : ?>
    <h2 class=”center”>Not Found</h2>
    <p class=”center”>
    <?php _e(‘Are you going maluca? The nega couldn`t find anything for you.’); ?></p>

    <?php endif;


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘static blog page screws my loop’ is closed to new replies.