PHP kód:
<?php query_posts('showposts=1');
if(have_posts()) : while(have_posts()) : the_post(); ?>
výpis prvního článku
<?php endwhile; endif; ?>
<?php query_posts('showposts=9&offset=1');
if(have_posts()) : while(have_posts()) : the_post(); ?>
výpis dalších článků
<?php endwhile; endif; ?>
V těch výpisech článků se to bude liši právě o tu jednu třídu. Kdybych měl být konkrétní (půjčím si z defaultní šablony WP)
PHP kód:
<div class="post" 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>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
<p class="postmetadata"><?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>
tak nahoře (u toho prvního článku) bude
PHP kód:
<div class="post first" id="post-<?php the_ID(); ?>">
a u ostatních
PHP kód:
<div class="post" id="post-<?php the_ID(); ?>">