Skip to content

Instantly share code, notes, and snippets.

@tenman
Created February 14, 2014 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenman/8986621 to your computer and use it in GitHub Desktop.
Save tenman/8986621 to your computer and use it in GitHub Desktop.
Raindrops grid post layout example
<?php
/*
* Template Name: test
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
global $rsidebar_show, $raindrops_document_type;
get_header( $raindrops_document_type );
do_action( 'raindrops_pre_'.basename( __FILE__) );
raindrops_debug_navitation( __FILE__ );
?>
<div id="yui-main" <?php raindrops_doctype_elements( '', 'role="main"' );?>>
<div class="yui-b">
<?php if ( is_home( ) && is_active_sidebar( 'sidebar-3' ) ) { // Widget only home ?>
<div class="topsidebar">
<ul>
<?php dynamic_sidebar( 'sidebar-3' );?>
</ul>
</div>
<br class="clear" />
<?php
} // end if ( is_home( ) && is_active_sidebar( 'sidebar-3' ) )
?>
<div class="<?php echo raindrops_yui_class_modify( );?>" id="container">
<div class="yui-u first<?php raindrops_add_class( 'yui-u first', true );?>">
<?php //get_template_part( 'loop', $raindrops_document_type ); ?>
<?php
/** raindrops_tile( )
*
*
*
*
*/
$args = array(
'posts_per_page' => 12,
'numberposts' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'post',
// 'meta_key' => '_thumbnail_id', //Shows only has post thumbnail
'post_status' => 'publish',
'post__not_in' => get_option( 'sticky_posts' ),
'raindrops_tile_col' => 4,//columns 2-4
);
raindrops_tile( $args );
?>
<br style="clear:both" />
</div>
<div class="yui-u">
<?php raindrops_prepend_extra_sidebar( ); ?>
<?php if ( $rsidebar_show ) { get_sidebar( 'extra' ); } ?>
<?php raindrops_append_extra_sidebar( ); ?>
</div>
<?php //add nest grid here ?>
</div>
</div>
</div>
<div class="yui-b">
<?php raindrops_prepend_default_sidebar( ); ?>
<?php get_sidebar( 'default' );?>
<?php raindrops_append_default_sidebar( ); ?>
</div>
</div>
<?php get_footer( $raindrops_document_type ); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment