So fellas. I'm redesigning one of my sites with a nice paid theme and all that. They have this option where you can either have one column for recent posts, or two columns for recent posts. Someone said to me "It'd look great if you could do one column and then have it split into two columns after one recent post!" The challenge was on. It would look great. This will all be done in the main index below I'm pretty sure
I'm fairly certain the option is switching around at this line:
So it's saying "do a full column class" and then do align it all left with the "col-left". However, if the "magazine" option is true, then do a "col-left magazine" which makes it two columns. Does this seem right to you guys?
If this is true I figured I could just cut that line and paste it further down, and repaste the post and excerpt building parts and viola. Except I don't know how to handle the counter.
I guess the counter needs to say "for the first post, use the full width. Then after that switch to the double column".
Can anyone offer any insight?
Code:
<?php get_header(); ?>
<?php global $woo_options; ?>
<div id="content" class="col-full">
<div id="main" class="col-left<?php if ($woo_options['woo_home_magazine'] == "true" ) echo ' magazine'; ?>">
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<div id="breadcrumb"><p>','</p></div>'); } ?>
<h3 class="blog-title"><?php echo $woo_options['woo_home_title_blog']; ?></h3>
<?php $exclude = ''; if (get_option('woo_slider_exclude') == "true") $exclude = get_option('woo_exclude'); ?>
<?php
$args = array( 'post_type' => 'post',
'post__not_in' => $exclude,
'paged'=> $paged );
query_posts($args); ?>
<?php if (have_posts()) : $counter = 0; ?>
<?php while (have_posts()) : the_post(); $counter++; ?>
<div class="post<?php if ($counter > 1) { echo ' last'; $counter = 0; } ?>">
<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div id="frontthumb"> <?php woo_image('width='.$woo_options['woo_thumb_w'].'&height='.$woo_options['woo_thumb_h'].'&class=thumbnail '.$woo_options['woo_thumb_align']); ?> </div>
<?php woo_post_meta(); ?>
<div class="entry">
<?php if ( $woo_options['woo_post_content'] == "content" ) the_content(__('Continue Reading →', 'woothemes')); else the_excerpt(); ?></div>
<?php if ( $woo_options['woo_post_content'] == "excerpt" ) { ?><span class="read-more"><a href="<?php the_permalink() ?>" title="<?php _e('Read More →','woothemes'); ?>"><?php _e('Read More →','woothemes'); ?></a></span> <?php } ?>
</div><!-- /.post -->
<?php if ( $counter == 0 ) { ?><div class="fix"></div><?php } ?>
<?php endwhile; else: ?>
<div class="post">
<p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
</div><!-- /.post -->
<?php endif; ?>
<div class="fix"></div>
<?php woo_pagenav(); ?>
</div><!-- /#main -->
<?php get_sidebar(); ?>
</div><!-- /#content -->
<?php get_footer(); ?>
I'm fairly certain the option is switching around at this line:
Code:
<div id="content" class="col-full">
<div id="main" class="col-left<?php if ($woo_options['woo_home_magazine'] == "true" ) echo ' magazine'; ?>">
So it's saying "do a full column class" and then do align it all left with the "col-left". However, if the "magazine" option is true, then do a "col-left magazine" which makes it two columns. Does this seem right to you guys?
If this is true I figured I could just cut that line and paste it further down, and repaste the post and excerpt building parts and viola. Except I don't know how to handle the counter.
I guess the counter needs to say "for the first post, use the full width. Then after that switch to the double column".
Can anyone offer any insight?