Created
August 31, 2012 03:35
-
-
Save jarretc/3548761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jc_paged_posts_columns() { | |
echo '<div id="paged-columns">'; | |
global $post; | |
$numposts = 11; | |
$args = array( 'numberposts' => $numposts, 'offset' => 10 ); | |
$column1 = get_posts( $args ); | |
echo '<ul class="column-list">'; | |
echo '<li class="column-heading">Page 2</li><ol>'; | |
foreach ( $column1 as $post ) : setup_postdata($post); ?> | |
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> | |
<?php endforeach; | |
echo '</ol></ul>'; | |
$args = array( 'numberposts' => $numposts, 'offset' => 21 ); | |
$column2 = get_posts( $args ); | |
echo '<ul class="column-list">'; | |
echo '<li class="column-heading">Page 3</li><ol>'; | |
foreach ( $column2 as $post ) : setup_postdata($post); ?> | |
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> | |
<?php endforeach; | |
echo '</ol></ul>'; | |
$args = array( 'numberposts' => $numposts, 'offset' => 32 ); | |
$column3 = get_posts( $args ); | |
echo '<ul class="column-list">'; | |
echo '<li class="column-heading">Page 4</li><ol>'; | |
foreach ( $column3 as $post ) : setup_postdata($post); ?> | |
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> | |
<?php endforeach; | |
echo '</ol></ul>'; | |
echo '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment