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 don
t have a post page setup, I can
t get the loop to work. If I do have it setup, I can`t modify it (because it throws the template out).Any ideas?
Here
s the code I
m 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 »'); ?> </div> <?php /* category + comment & edit */ ?> <p class="postmetadata"> Posted in <?php the_category(', ') ?> <strong>|</strong> <?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('','','« Previous Entries') ?></div> <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div> </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;
get_footer();
?>`
- The topic ‘static blog page screws my loop’ is closed to new replies.