Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Masonry Blog
- *
- * Blog Template
- *
- */
- ?>
- <?php include_once( 'header.php' ); ?>
- <!-- Start the Loop. -->
- insert sticky here
- <div id="sticky">
- <?php
- $sticky = get_option( 'sticky_posts' );
- rsort( $sticky );
- $sticky = array_slice( $sticky, 0, 2 );
- if (is_numeric($sticky[0])) {
- /* Query sticky posts */
- query_posts( array( 'post__in' => $sticky, 'caller_get_posts' =>1 ) );
- while ( have_posts() ) : the_post();
- the_post_thumbnail( array(920,540), $attr );
- the_title('<h3>', '</h3>');
- if($post->post_excerpt) :
- the_excerpt();
- endif;
- endwhile; // End the loop.
- wp_reset_query();
- }
- ?><div>
- <div id="container2">
- <?php
- $temp = $wp_query;
- $wp_query= null;
- $wp_query = new WP_Query();
- $wp_query->query('posts_per_page=10'.'&paged='.$paged);
- while ($wp_query->have_posts()) : $wp_query->the_post();
- ?>
- <div class="brick">
- <div class="brick_featured_image">
- <?php if ( has_post_thumbnail() ) {
- $size=25;
- ?>
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Click to view: <?php the_title_attribute(); ?>">
- <?php the_post_thumbnail( $size ); } ?>
- </a>
- <div class="brick_header">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Click to view: <?php the_title_attribute(); ?>">
- <?php the_title(); ?></a>
- </div>
- </div>
- </div>
- <?php endwhile;?>
- <?php $wp_query = null; $wp_query = $temp;?>
- <!-- stop The Loop. -->
- </div><!-- container -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement