Title: thinkofmedia's Replies | WordPress.org

---

# thinkofmedia

  [  ](https://wordpress.org/support/users/thinkofmedia/)

 *   [Profile](https://wordpress.org/support/users/thinkofmedia/)
 *   [Topics Started](https://wordpress.org/support/users/thinkofmedia/topics/)
 *   [Replies Created](https://wordpress.org/support/users/thinkofmedia/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/thinkofmedia/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/thinkofmedia/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/thinkofmedia/engagements/)
 *   [Favorites](https://wordpress.org/support/users/thinkofmedia/favorites/)

 Search replies:

## Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Change my theme nav to post categories only](https://wordpress.org/support/topic/change-my-theme-nav-to-post-categories-only/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/change-my-theme-nav-to-post-categories-only/#post-1386294)
 * I changed the ul tags to li ones and this fixed it. Thanks for your help.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Change my theme nav to post categories only](https://wordpress.org/support/topic/change-my-theme-nav-to-post-categories-only/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/change-my-theme-nav-to-post-categories-only/#post-1386293)
 * That’s almost it. How would I make the blog stay inline with the home button 
   now though.
 *     ```
       <div id="nav">
   
       <ul>
                              <li <?php if ( is_home() ) { ?> class="current_page_item" <?php } ?>><a href="<?php echo get_option('home'); ?>/"><span>Home</span></a></li>
                               <?php if ( get_option('woo_addblog') == "true" ) { ?>
                               <li <?php if ( is_category() || is_search() || is_single() || is_tag() || is_search() || is_archive() ) { ?> class="current_page_item" <?php } ?>>
   
                                   <?php woo_menu( get_option('woo_menu_pages') ); ?>
   
                               <?php } ?>
                               <?php if (get_option('woo_catmenu') == "true") { ?></ul>
       <ul><?php wp_list_categories('title_li=&child_of='.get_option('woo_blog_cat_id') ); ?></ul>
       <?php } ?>
   
                       </div>
       ```
   
 * I removed the blog li as it was not needed
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Splitting posts into 2 columns](https://wordpress.org/support/topic/splitting-posts-into-2-columns/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/splitting-posts-into-2-columns/#post-1383120)
 * Apologizes on the theme link.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Splitting posts into 2 columns](https://wordpress.org/support/topic/splitting-posts-into-2-columns/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/splitting-posts-into-2-columns/#post-1383078)
 * I haven’t sorted it yet. Basically the posts should lay alike handbag.com were
   there staggered wordpress theme is here. But if you email me on jim[AT]thinkofmedia[
   DOT]org I’ll dropbox my theme.
 * **[Moderated]**Please do not post links to websites that offer **premium **themes
   for free. Email updated slightly to, it’ll reduce the amount of spam you’ll get
   for posting it openly here.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Splitting posts into 2 columns](https://wordpress.org/support/topic/splitting-posts-into-2-columns/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/splitting-posts-into-2-columns/#post-1383062)
 * What would I replace from my code though. And would I need to delete the endwhile
   details from the post end. Really grateful for your help.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Splitting posts into 2 columns](https://wordpress.org/support/topic/splitting-posts-into-2-columns/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/splitting-posts-into-2-columns/#post-1383017)
 *     ```
       <div id="main-content" class="home">
          	 <div class="content">
       				<div class="col-left">
       						<div id="main">
   
                       <!-- Post Starts -->
   
       				<?php if (have_posts()) : ?>
          <?php
                           // Split the main content pages from the options, and put in an array
                           $featpages = get_option('woo_main_pages');
                           $featarr=split(",",$featpages);
                           $featarr = array_diff($featarr, array(""));
                      	 $posts_per_page = get_query_var('posts_per_page');
                        if ($posts_per_page < 1) $posts_per_page = 10; //MUST have a posts per page
                       $posts_per_col = ceil($posts_per_page/2);
                       $counter = 0;
   
       				 foreach ( $featarr as $featitem ) {
                       query_posts('page_id=' . $featitem);
   
       		if (have_posts()) : while (have_posts()) : the_post();
       	$i++;
       	$class = ($i&1) ? '-fl' : '-fr';
       	?>
       div class='leftcol' >
   
          <?php while (have_posts()) : the_post(); ?>
             <?php ++$counter;
             if (is_sticky() && is_frontpage() && $counter > 1) {
                // Recalc posts_per_col because stickies after the first are not included
                $posts_per_col = ceil(++$posts_per_page/2);
             }
             if ($counter == ($posts_per_col + 1)) {
                echo '</div><!-- End leftcol --><div class="rightcol">';
             } ?>
   
       	<div class="post<?php echo $class; ?>">
   
       <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
   
       					<?php if ( get_post_meta($post->ID, 'image', true) ) { ?>
                           <img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="" class="home-icon" />
       					<?php } ?> 
   
                              <?php the_excerpt(); ?>
                              <a href="<?php the_permalink() ?>">Read more</a></p>        
   
                       </div>
                       <?php endwhile; endif; ?> <!-- Post Ends -->
                       <?php } ?>
       <?php endwhile; ?>
          </div><!-- End left/rightcol -->
          <div style='clear: both'></div>
   
                       <!-- box Ends -->
   
       			<?php //endwhile; endif; ?>  
   
                  				 </div><!-- main ends -->
              			 </div><!-- .col-left ends -->
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Splitting posts into 2 columns](https://wordpress.org/support/topic/splitting-posts-into-2-columns/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/splitting-posts-into-2-columns/#post-1383016)
 * What would I need to get rid of to add this. As all I get is a white screen.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Class not adding via loop](https://wordpress.org/support/topic/class-not-adding-via-loop/)
 *  Thread Starter [thinkofmedia](https://wordpress.org/support/users/thinkofmedia/)
 * (@thinkofmedia)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/class-not-adding-via-loop/#post-1381004)
 * I amended my code similar to yours. But still do not get the alternating classes.
 * Can you see what’s missing.
 *     ```
       <?php get_header(); ?>
   
       	<!-- Featured Slider -->
       	<?php include (TEMPLATEPATH . "/includes/slider.php"); ?>
       	<!-- Featured Slider end -->
   
       <div id="main-content" class="home">
          	 <div class="content">
       				<div class="col-left">
       						<div id="main">
   
                       <!-- Post Starts -->
                      <div class="box">
   
       				<?php
                           // Split the main content pages from the options, and put in an array
                           $featpages = get_option('woo_main_pages');
                           $featarr=split(",",$featpages);
                           $featarr = array_diff($featarr, array(""));
   
       				 foreach ( $featarr as $featitem ) {
                       query_posts('page_id=' . $featitem);
   
               $i=1;
       		if (have_posts()) : while (have_posts()) : the_post();
       	$i++;
       	$class = ($i&1) ? 'fl' : 'fr';
       	?>
   
       	<div class="post<?php echo $class; ?>">
                       	<div class="box-post-content">	
   
       <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
   
       					<?php if ( get_post_meta($post->ID, 'image', true) ) { ?>
                           <img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="" class="home-icon" />
       					<?php } ?> 
   
                              <?php the_excerpt(); ?>
                              <a href="<?php the_permalink() ?>">Read more</a></p>        
   
              				 </div> <!-- box post -->
   
                       <?php endwhile; endif; ?>
                       </div> <!-- Post Ends -->
                       <?php } ?>
   
                    </div>
                       <!-- box Ends -->
   
       			<?php //endwhile; endif; ?>  
   
                  				 </div><!-- main ends -->
              			 </div><!-- .col-left ends -->
   
               <?php get_sidebar('home'); ?>
   
           </div><!-- .content Ends -->
       </div><!-- #main-content ends -->
   
       <?php get_footer(); ?>
       ```
   

Viewing 8 replies - 1 through 8 (of 8 total)