Display latest post
-
I’m very new to WordPress so this is probably a very very simple problem.
I want index.php to display my latest post.
This is what I have so far:
<?php if (have_posts()) : ?> <?php while (have_posts()) : query_posts('p=1'); ?> <span id="a1"><?php the_time('F jS, Y') ?></span><br /> <h3><?php the_title(); ?></h3> <br /> <?php the_content(); ?><br /> <?php the_tags('Tags: ', ', ', '<br /><br />'); ?> <a href="<?php bloginfo('rss2_url'); ?>" class="rss">Subscribe!</a><br /><br /> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php endwhile; ?> <br /><span class="alignleft"><?php next_posts_link('« Older Entries') ?></span> <span class="alignright"><?php previous_posts_link('Newer Entries »') ?></span> <?php else : ?> <h2>Error</h2> <br />Can't find anything like that. <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
This only works in displaying the title, date and tags of the post. It won’t display the content.
Any help appreciated.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display latest post’ is closed to new replies.