Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created October 30, 2011 00:36
Show Gist options
  • Save billerickson/1325304 to your computer and use it in GitHub Desktop.
Save billerickson/1325304 to your computer and use it in GitHub Desktop.
List Posts tagged 'thesis-tip'
<?php
/**
* List Posts tagged 'thesis-tip'
*
*/
function be_display_thesis_tip() {
$args = array(
'tag' => 'thesis-tip',
'posts_per_page' => '-1',
);
$tips = new WP_Query( $args );
if( $tips->have_posts() ):
echo '<ul>';
while ( $tips->have_posts() ) : $tips->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
endwhile;
echo '</ul>';
endif;
wp_reset_postdata();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment