Hey guys.. like what i said on the title. how to show different post in another page on wordpress? i inspire from mintees.com site..
If you want to display 1 post from different categories on the same page you could try something like this: <?php query_posts('cat=1,2,3,4,5,6,7,8,9&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <?php the_title(); ?> <?php the_content(); ?> <?php endwhile;?>
It looks to me like all the tees posts are from the same category though, but the post1 styled differently. <div id='post1'> <?php query_posts('cat=1&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <h3><?php the_title(); ?></h3> <p class=post1content><?php the_content(); ?></p> <?php endwhile;?> </div> <div id='otherposts'> <?php query_posts('cat=1&showposts=10&offset=1'); ?> <?php while (have_posts()) : the_post(); ?> <h3><?php the_title(); ?></h3> <p class='otherpostsconent'><?php the_content(); ?></p> <?php endwhile;?> </div> Just change your stylesheet to make the post1 how you want it and otherposts how you want it. Perhaps someone else might have a better alternative with using only 1 loop?
dude, i'm using this code.. but failed.. can you correct it? <section class="artikel1"> <?php query_posts('cat=1&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <section class="date"> <p id="day"><?php echo date('d')?></p> <p id="month"><?php echo date('M')?></p> <p id="year"><?php echo date('Y')?></p> </section><!-- end date --> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_content(); ?> <img src="<?php echo bloginfo('template_directory'). '/img/post-image1.jpg'; ?>" alt="post-image" --> <?php endwhile;?> </li> </section><!-- end artikel1 --> <section class="artikel2"> <?php query_posts('cat=1&showposts=1&offset=1'); ?> <?php while (have_posts()) : the_post(); ?> <section class="date"> <p id="day"><?php echo date('d')?></p> <p id="month"><?php echo date('M')?></p> <p id="year"><?php echo date('Y')?></p> </section><!-- end date --> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p> <?php the_content(); ?> </p> <img src="<?php echo bloginfo('template_directory'). '/img/post-image2.jpg'; ?>" alt="post-image" --> <?php endwhile;?> </section><!-- end artikel2 -->