Created
June 22, 2012 10:24
-
-
Save Mamaduka/2971897 to your computer and use it in GitHub Desktop.
Add excerpt and continue reading link to Woo - Tabs widget
This file contains hidden or 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
<?php | |
function woo_widget_tabs_latest( $posts = 5, $size = 45 ) { | |
global $post; | |
$latest = get_posts( 'ignore_sticky_posts=1&numberposts='. $posts .'&orderby=post_date&order=desc' ); | |
foreach($latest as $post) : | |
setup_postdata($post); | |
?> | |
<li class="fix"> | |
<?php if ($size <> 0) woo_image( 'height='.$size.'&width='.$size.'&class=thumbnail&single=true' ); ?> | |
<a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php the_title(); ?></a> | |
<span class="meta"><?php the_time( get_option( 'date_format' ) ); ?></span> | |
<?php the_excerpt(); ?> | |
<a title="<?php the_title(); ?>" href="<?php the_permalink() ?>"><?php _e( 'Continue Reading...', 'woothemes' ) ?></a> | |
</li> | |
<?php endforeach; wp_reset_query(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment