Revision: 28881
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at July 15, 2010 10:12 by gera3d
Initial Code
<?php while (have_posts()) : the_post(); ?> <!-- EVEN IF YOU'VE GOT PAGEST OF POSTS AFTER THE HOMEPAGE, ONLY THE FIRST POST ON THE FIRST PAGE WILL BE STYLED DIFFERENTLY --> <?php if (is_paged()) : ?> <?php $postclass = ('regular'); ?> <?php else : ?> <?php $postclass = ($post == $posts[0]) ? 'featured' : 'regular'; ?> <?php endif; ?> <!-- NOW THAT WE'VE SET UP THE CONDITIONS, LETS CREATE A DIV WITH THE CSS CLASS FED DYNAMICALLY --> <div class="<?php echo $postclass; ?>"> <!-- THIS IS WHERE ALL THE SCRIPT FOR YOUR POST GOES --> <?php comments_template() ?> <?php endwhile ?>
Initial URL
Initial Description
This code goes into the index.php
Initial Title
Featured Post on Wordpress
Initial Tags
wordpress
Initial Language
PHP