Return to Snippet

Revision: 14468
at June 4, 2009 17:34 by gfazioli


Initial Code
/**
 * Show latest post for Tags
 * 
 * @return 
 * @param object $tag
 * @param object $show[optional]
 */
function show_title_tag( $tag, $show=5 ) {
	global $post;
	
	$posts = query_posts('tag=' . $tag . '&showposts=' . $show );
	echo "<ul>";
	foreach ($posts as $post ) : setup_postdata($post); ?>
		<li><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></li>
	<?php endforeach;
	echo "</ul>";
}

Initial URL
http://www.undolog.com

Initial Description


Initial Title
Wordpress, show posts for Tags

Initial Tags
post, wordpress

Initial Language
PHP