Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackfearing/db1510b8814ed4c44dc698fd3d323d2b to your computer and use it in GitHub Desktop.
Save jackfearing/db1510b8814ed4c44dc698fd3d323d2b to your computer and use it in GitHub Desktop.
// FOR USE WITH WP-SNAP PLUGIN
// http://www.nateomedia.com/wares/downloads/wordpress/wp-snap/
<?php if (function_exists('wp_snap')) { echo "<div class='group'>" . wp_snap('cat=8&child=true&firstload=recent') . "</div>"; } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="profile group">
<?php
if(has_post_thumbnail()) {
the_post_thumbnail(array(75,75)); // See example code above to add and array to post thumbnail
} else {
echo "<a href=".get_permalink()."><img src='".get_bloginfo('template_url')."/_/img/profile-null-small-75x75.gif' class='thumb-null' /></a>";
}
?>
<!-- IF STATEMENT WITH ELSE -->
<?php
$groups = get_group('Directory');
if (count($groups, true)){
foreach($groups as $group){
echo "<div class='directory-block'>";
echo "<h2>","<a href=".get_permalink().">".$group['directory_first_name'][1]." ".$group['directory_last_name'][1],"</a>","</h2>";
echo "<p>","<a href='mailto:".$group['directory_email'][1]."'>".$group['directory_email'][1],"</a>","</p>";
echo "<p>".$group['directory_phone'][1]."</p>";
echo "</div>";
}
?>
<?php }
else { ?>
<h2>no content available</h2>
<?php } ?>
</div><!-- /GROUP -->
<?php endwhile; endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment