Different page, same posts.. Help!
-
Hey guys,
So here is my idea and problem. I want to create a website for my dad with one big post on top (always the latest post) and 4 smaller blog posts beneath it.
I searched for a solution on internet, but could really find a solution. I hope you guys can help me out!
Here is the code for the website so far:
<?php get_header(); ?> <div id="wrap"> <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('showposts=1' . $paged); ?> <?php $posts = get_posts('numberposts=1&offset=0'); foreach ($posts as $post) : start_wp(); ?> <?php static $count1 = 0; if ($count1 == "1") { break; } else { ?> <div class="firstpost"> <div class="post-date"><span class="post-month"><?php the_time('M') ?></span> <span class="post-day"><?php the_time('j') ?></span></div> <div class="post-title"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Link to this article!"><?php the_title(); ?></a></h2> <span class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span> </div> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php $count1++; } ?> <?php endforeach; ?> <div id="leftmain"> <?php query_posts('showposts=1' ); ?> <?php $posts = get_posts('numberposts=5&offset=1'); foreach ($posts as $post) : start_wp(); ?> <?php static $count2 = 0; if ($count2 == "4") { break; } else { ?> <div class="post"> <div class="post-date"><span class="post-month"><?php the_time('M') ?></span> <span class="post-day"><?php the_time('j') ?></span></div> <div class="post-title"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Link to this article!"><?php the_title(); ?></a></h2> <span class="post-comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span> </div> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php $count2++; } ?> <?php endforeach; ?> <div class="clear"></div> <div class="navigation"> <span class"previous-entries"><?php next_posts_link('Older Entries') ?></span> <span class="next-entries"><?php previous_post_link('Newer Entries') ?></span> </div> </div> <div id="rightmain"> <?php get_sidebar(); ?> </div> <div class="clear"></div> </div> <?php get_footer(); ?>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Different page, same posts.. Help!’ is closed to new replies.