• Dunam

    (@dunam)


    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;'); ?>
    </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('','','&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></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();
    ?>

    `

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Dunam

    (@dunam)

    ahum, sorry for the misuse of backticks. In any case, I think I`m making a more elementary mistake than bad code.

    Thread Starter Dunam

    (@dunam)

    Any ideas anyone?

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