Can anyone help me with this? Static homepage
-
I’ve got a static home page, but i have an area at the top of the page that shows the most recent blog posts. Trouble is now the static home page text is gone and it shows the blog posts underneath this section too.
Here’s the code:
?<?php /* Template Name: Homepage */ ?> <?php get_header(); ?> <div id="news"> <div id="featured"> <h1>Latest News</h1> <?php query_posts('showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> <?php the_excerpt(); ?> <?php endwhile; ?> </div> <div id="headlines"> <h2>News Headlines</h2> <?php query_posts('showposts=3&offset=1'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> </div> <p class="clear"> </div> <div id="contenthome"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif"><strong>Read the rest of this page »</strong> '); ?> <?php link_pages('<strong>Pages:</strong> ', ' ', 'number'); ?> </div> </div> <?php endwhile; endif; ?> <?php edit_post_link('Edit post.', '', ' '); ?> </div> <?php get_footer(); ?>
Here is a link to the page, basically underneath the blue div showing the latest news should be the static home page text rather than the blog posts.
Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Can anyone help me with this? Static homepage’ is closed to new replies.