[ create a new paste ] login | about

Link: http://codepad.org/nhnGoFYh    [ raw code | fork ]

pmdci - PHP, pasted on May 4:
<code>
<?php get_header(); ?>

  <div id="content">

    <?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) == 0) : $wp_query->next_post(); else : the_post(); ?>

      <div id="left-column">
        <div class="post" id="post-<?php the_ID(); ?>">
          <div class="title">
            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="permalink to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
          </div>

	  <div class="entry">
	    <?php the_content('',FALSE,''); ?>
            <small class="author"><?php echo get_the_term_list( $post->ID, 'cidade', '<b>Cidade(s)</b>: ', ', ', '' ); ?></small>
          </div>
        </div>
      </div>

<?php endif; endwhile; else: ?>
<div>Alternate content</div>
<?php endif; ?>

<!--/left-post -->


<?php $i = 0; rewind_posts(); ?>
<?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) !== 0) : $wp_query->next_post(); else : the_post(); ?>


      <div id="right-column">
        <div class="post" id="post-<?php the_ID(); ?>">
          <div class="title">
            <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="permalink to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
          </div>

	  <div class="entry">
	    <?php the_content('',FALSE,''); ?>
            <small class="author"><?php echo get_the_term_list( $post->ID, 'cidade', '<b>Cidade(s)</b>: ', ', ', '' ); ?></small>
          </div>
        </div>
      </div>


<?php endif; endwhile; else: ?>
<div>Alternate content</div>
<?php endif; ?>

	
  </div><!--/content -->
  
<?php get_sidebar(); ?>

<?php get_footer(); ?>
</code>


Create a new paste based on this one


Comments: