Whiskey Air Dark New Index Template

4 February 2010

Like I promised in a previous post, here is the code required to show latest 5 posts followed by 15 more, like on my homepage. You need to edit the index.php template and add 2 sub-loops separated by wp_reset_query(). Simple as that. Here is the entire index.php code (you should be able to pull the entire loop from there):


<?php get_header();?>
<div id="content">

<br clear="all" /><br />
<?php if(have_posts()) : ?>
 <?php
 query_posts('posts_per_page=5&offset=0');
 while(have_posts()) : the_post();
 ?>
 <div id="post-<?php the_ID();?>" <?php post_class();?>>
 <h2><a href="<?php the_permalink();?>" rel="bookmark" title="Permanent link to <?php the_title();?>"><?php the_title();?></a></h2>
 <small><?php the_time('j F Y');?> by <?php the_author();?></small>
 <div>
 <div style="float:left; margin-right:8px"><?php echo get_the_image_link(array('Thumbnail','My Thumbnail'),'thumbnail');?></div>
 <?php the_excerpt('Read more &raquo;');?>
 </div>
 <div style="clear:both"></div>
 <p>Category: <?php the_category(', ');?> | <?php comments_popup_link('No comments &#187;', '1 comment &#187;', '% comments &#187;');?><br /><?php the_tags(); ?></p>
 </div>
 <?php endwhile;?>

 <?php wp_reset_query();?>

 <h2>More recent articles</h2>
 <br /><br />
 <?php
 query_posts('posts_per_page=15&offset=6');
 while (have_posts()) : the_post();
 ?>
 <div id="post-<?php the_ID();?>" <?php post_class();?>>
 <p>
 <strong><a href="<?php the_permalink();?>" rel="bookmark" title="Permanent link to <?php the_title();?>"><?php the_title();?></a></strong><br />
 <small><?php the_time('j F Y');?> by <?php the_author();?></small>
 </p>
 </div>
 <?php endwhile;?>

 <div>
 <div><?php next_posts_link(__('&laquo; Older Entries','whiskey'));?></div>
 <div><?php previous_posts_link(__('Newer Entries &raquo;','youdrunk'));?></div>
 </div>

 <?php else : ?>
 <h2>Not found</h2>
 <p>No results found.</p>
 <?php endif;?>
</div>
<?php get_sidebar();?>
<?php get_footer();?>

Download index.php here.

You may have noticed that I’m using an unsanitized function, get_the_image_link, to show a thumbnail next to each excerpt. I noticed it when copying the code. Still waiting for a new version of Whiskey Air?

Whiskey Air Theme

2 September 2009

Download wp-whiskey-air 0.9.1 here.

Whiskey Air 0.9 Theme Released

23 April 2009

Finally, Whiskey Air 0.9 is now live. I have turned it into a framework and I have started using it on several blogs, such as this one and a culinary recipes one.

With many bug fixes from 0.8.2, WordPress 2.7.x compatibilities and an enlarged sidebar area, Whiskey Air 0.9 is perfect for beginner blogs, professional blogs, and even MFA blogs.

Download Whiskey Air 0.9 and give it a try. Feedback is welcome.

whiskey-air-0-9-ss-1 whiskey-air-0-9-ss-2

Theme Updates On The Way

21 April 2009

I’ve been working frantically to the new blog theme, and now I give you version 0.9. I now have a wider sidebar, which easily fits a 300×250 banner. Moved the categories to the footer and removed them from the sidebar. A new feature, still being developed, is the updates section.

The theme is on the way, and the moment I finalize it, I will release it here.

New Theme In Development

9 April 2009

The current theme has been changed due to some inconsistencies and source deprecation issues in the last one. This one is based on Whiskey Air 0.8.2, enhanced for WordPress 2.7. Whiskey Air is a theme framework, very easy to work with, and after some minor tweaks, modifications and enhancements, will be released as 0.9.

Random advice:

  • Do not use CommentLuv and IntenseDebate together. It won’t work.
  • Zemanta plugin looks like spam to me.
  • Use All In One SEO Pack and canonical URL will work like a charm.
  • Branding is the key. The secret. The power. I will show you.
  • The stylesheet needs some more tweaks.
Get Adobe Flash playerPlugin by wpburn.com wordpress themes