PDA

View Full Version : Need a layout help


Vivaldi
2009-10-25, 09:00 PM
HI all ... this one gives me headache so far ... played around with it and never made it complete :-(
Now is it possible to have an monthly archive list with post title and maybe excerpt on index page!?
What I mean Index page would look like this:

October 2009
Post 1 - This is the first post
Post 2 - Second post.
Post 3 - The last one

November 2009
Post 01 for nov - Small description
Post 02 - Second description.

Any ideas!? I’m thinking this can be twisted and turned with pics and categories as well and that would give a great new blog-layout thinggy … thanks in advance for any kind of replay |thumb

adult-help
2009-11-09, 05:39 PM
Well, there are several ways to do it. The easiest (but not the smartest) is to use the default loop of the index page but add the condition that will add month titles. To do it place the following code right after

<?php while (have_posts()) : the_post(); ?>

in the index.php of your theme



<?php
if($current_month != get_the_time('m')){
?>
<h1><?php the_time('F') ?></h1>
<?php
}
$current_month = get_the_time('m');
?>

Vivaldi
2009-11-10, 10:00 PM
tried that but no luck with it ... hired help is the way to do things You don't know :-)
thanks ;-)

adult-help
2009-11-11, 02:03 PM
Hit me on ICQ 817776 and I will do it for free.