Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $loop = new WP_Query( array( 'post_type' => 'portfolio' ) ); ?>
- <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <div class="four columns">
- <?php the_content(); //along with other stuff in looped div ?>
- </div>
- <?php endwhile ?>
- <?php $counter = 1 ?>
- <?php $loop = new WP_Query( array( 'post_type' => 'portfolio' ) ); ?>
- <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
- <div class="four columns <?php if ($counter % 4 == 1){echo 'alpha'}else if ($counter % 4 == 0){echo 'omega'} ?>">
- <?php the_content(); //along with other stuff in looped div ?>
- </div>
- <?php $counter++ ;
- endwhile ?>
- <?php $loop = new WP_Query( array( 'post_type' => 'portfolio' ) ); ?>
- <?php
- $i = 0;
- while ( $loop->have_posts() ) : $loop->the_post();
- if( $i % 4 == 0 )
- $class = 'omega';
- else
- $class = '';
- ?>
- <div class="four columns <?php echo $class ?>">
- <?php the_content(); //along with other stuff in looped div ?
- $i++;
- >
- </div>
- <?php endwhile ?>
- div#test > *:nth-child(4n+4) {
- color: red;
- }
Add Comment
Please, Sign In to add comment