• daniel7912

    (@daniel7912)


    Hi,

    I’ve been trying to learn wordpress lately and have converted my website layout to work with the wordpress code, but now I’m getting to the more technical stuff and finding it confusing!

    <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <p><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></p> <?php the_content('Read the rest of this entry &raquo;'); ?> <p><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?>

    Above is the code I currently have to display my posts, and I want for example, the first post to be displayed at the top of the page and the 2nd post at the bottom. When the code is generated, it puts each post in its own div tag called ‘post-6’ for example, but how do I define this in the CSS? Every time I add a new post it will have a different number so I dont know how to tackle the problem.

    Thanks for any help!

The topic ‘Positioning posts?’ is closed to new replies.