[sourcecode language="css"]<?php
/*
Template Name: gridblog
*/
get_header();
?>
<div class="contentwrappermain">
<div class="contentwrapper">
<table>
<tr>
<td>
<div class="innercontentleft" style="margin:0px; width:670px">
<?php
$args = "post_type=post&paged=" . get_query_var( 'paged' );
query_posts($args);
if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="blogmain">
<div class="blogmain_content">
<!-- Display the date and a link to other posts by this posts author. -->
<div class="featured_box" style="width: 180px;float: left; padding: 15px;">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<small><?php the_time('F jS, Y') ?> by <?php the_author_posts_link() ?></small><br>
<?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
<!-- <a href="<?php the_permalink(); ?>"class="img_hover_trans"><?php the_post_thumbnail('featured-small'); ?></a> -->
<p><?php $temp_arr_content = explode(" ",substr(strip_tags(get_the_content()),0,170)); $temp_arr_content[count($temp_arr_content)-1] = ""; $display_arr_content = implode(" ",$temp_arr_content); echo $display_arr_content; ?><?php if(strlen(strip_tags(get_the_content())) > 170) echo "..."; ?></p>
<p class="blog_post"><a href="<?php the_permalink() ?>" rel="bookmark"><span style="color:#666666; font-style:italic; ">Read more »</span></a></p>
</div>
<!--//featured_box-->
<!--
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p class="blogpost_time">Posted on: <span><?php echo get_the_date(); ?></span></p>
<p class="blogpost_discription"><?php echo get_the_excerpt(); ?></p>
<p class="blog_post"><?php the_tags('Tags: ', ', ', '<br />'); _e("Posted in", "wpoupon"); ?> <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> -->
</div>
</div>
<?php
endwhile;
if (function_exists('page_navi'))
page_navi();
else {
?>
<ul id="blog_pagination">
<li class="prev"><?php next_posts_link(__('« Older Entries', "wpoupon")) ?></li>
<li class="next"><?php previous_posts_link(__('Newer Entries »', "wpoupon")) ?></li>
</ul>
<?php
}
?>
</div>
</td>
<td>
<div class="contentright">
<?php get_sidebar(); ?>
</div>
</div><!-- #content -->
</div><!-- #container -->
</td>
</tr>
</table>
<?php get_footer(); ?>
[/sourcecode]
Comments
Post a Comment